(* Preliminaries concerning the involved data types and auxiliary functions *) theory Prelim imports"Fresh_Identifiers.Fresh_String""Bounded_Deducibility_Security.Trivia" begin
subsection‹The basic types›
(* This version of string is needed for code generation: *) type_synonym string = String.literal definition"emptyStr = STR ''''"
fun SucPH where "SucPH ph = (if ph = closedPH then closedPH else Suc ph)"
(* The users of the system: *) datatype user = User string string string fun nameUser where"nameUser (User name info email) = name" fun infoUser where"infoUser (User name info email) = info" fun emailUser where"emailUser (User name info email) = email" definition"emptyUser ≡ User emptyStr emptyStr emptyStr"
datatype score = NoScore | MinusThree | MinusTwo | MinusOne | Zero | One | Two | Three
fun scoreAsInt :: "score ==> int"where "scoreAsInt MinusThree = -3"
|"scoreAsInt MinusTwo = -2"
|"scoreAsInt MinusOne = -1"
|"scoreAsInt Zero = 0"
|"scoreAsInt One = 1"
|"scoreAsInt Two = 2"
|"scoreAsInt Three = 3"
datatype exp = NoExp | Zero | One | Two | Three | Four (* expertise *) (* A review content consists of an expertise, a score and the review text *) (* review content: *) type_synonym rcontent = "exp * score * string" fun scoreOf :: "rcontent ==> score"where"scoreOf (exp,sc,txt) = sc" (* A review is a list of review contents, with the first (i.e., the head) being the most recent. *) type_synonym review = "rcontent list" (* A reviewer may change the expertise, score and the review (multiple times) during the discussion phase, butallchangesshouldbetransparent,i.e.,historyofchangesshouldberecorded; thisiswhyareviewisalistofreviewcontentsratherthanasinglereviewcontent.
*)
(* A paper consists of strings for title and abstract, thepapercontent,theassociatedreviews,adiscussionandan(updatable)decision.
*) datatype paper = Paper string string pcontent "review list" discussion "decision list"
fun titlePaper where"titlePaper (Paper title abstract content reviews dis decs) = title" fun abstractPaper where"abstractPaper (Paper title abstract content reviews dis decs) = abstract" fun contentPaper where"contentPaper (Paper title abstract content reviews dis decs) = content" fun reviewsPaper where"reviewsPaper (Paper title abstract content reviews dis decs) = reviews" fun disPaper where"disPaper (Paper title abstract content reviews dis decs) = dis" (* all successive decisions for a paper, listed historically: *) fun decsPaper where"decsPaper (Paper title abstract content reviews dis decs) = decs" (* the current decision: *) fun decPaper where"decPaper pap = hd (decsPaper pap)"
definition emptyPaper :: paper where "emptyPaper ≡ Paper emptyStr emptyStr NoPContent [] emptyDis []"
(* Data (info) associated to a conference: *) datatype conf = Conf string string fun nameConf where"nameConf (Conf name info) = name" fun infoConf where"infoConf (Conf name info) = info" definition"emptyConf ≡ Conf emptyStr emptyStr"
(* Roles: author, reviewer (owner of the nth review of a paper), program committee (PC) member, chair *) datatype role = Aut paperID | Rev paperID nat | PC | Chair fun isRevRole where"isRevRole (Rev _ _ ) = True" | "isRevRole _ = False"
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.