CSP-M Syntax
Details of supported CSP-M syntax
Section titled “Details of supported CSP-M syntax”PROCESS DEFINITIONS
Section titled “PROCESS DEFINITIONS”Process = ProcessExpression
PROCESS EXPRESSIONS
Section titled “PROCESS EXPRESSIONS”STOPdeadlocking processSKIPterminating processCHAOS(a)a: set of channel expressionsch->Psimple action prefix where ch is a channel name possibly followed by a sequence of outputs “!v” and input “?VAR”, where v is a value expression and VAR a variable identifierch?x:v->Paction prefix with set of accepted valuesP ; Qsequential compositionP ||| QinterleavingP [] Qexternal choiceP |~| Qinternal choiceP /\ Qinterruptp [> Quntimed timeoutP [| a |] Qparallel composition with synchronisation on set of channel expressions aP [ a || a' ] Qalphabetised parallelP [ c<->c' ] Qlinked parallelP \ ahiding of channel expressions in cP [[ c<-c' ]]renaming of channels c into c’if B then P else Qb & Pguard using a boolean expression b[]x:v@Preplicated external choice (x: variable, v: set value expression)|~|x:v@Preplicated internal choice (x: variable, v: set value expression)|||x:v@Preplicated interleave (x: variable, v: set value expression);x:s@Preplicated sequential composition (s: sequence expression)||x:v@[a']Preplicated alphabetised parallel[| a |]x:s@Preplicated sharing[c<->c']x:s@Preplicated linked parallel (sequence s must be non empty)let f1=E1 ... fk=Ek within P
BOOLEAN EXPRESSIONS
Section titled “BOOLEAN EXPRESSIONS”truefalseb1 and b2(b1 && b2also accepted but not in CSP-M)b1 or b2(b1 || b2also accepted but not in CSP-M)b1 <=> b2equivalenceb1 => b2implicationnot bv==wequality of valuesv!=wdisequality of valuesv<w,v>wstrict orderingv<=w,v>=wnon-strict ordering (v=<w also accepted)member(v,w)set membership checkempty(a)set emptiness checknull(s)sequence emptiness checkelem(x,s)sequence member check
VALUE EXPRESSIONS
Section titled “VALUE EXPRESSIONS”v+w,v-waddition and subtractionv*wmultiplicationv/winteger divisionv % wdivision remainderbool(b)convert a boolean expression into a boolean value{v,w,...}enumerated sets{m..n}closed range{m..}open rangeunion(v,w)set unioninter(v,w)set intersectiondiff(v,w)set differenceUnion(A)generalized union of a set of setsInter(A)generalized intersectioncard(a)cardinality of a{x1,...,xn | x<-a,b}Eventsall channel expressions on all declared channels{| ... |}closure of set of channel expressionsSet(a)all subsets of a<>empty sequence<v,w,...>explicit sequence<m..n>closed range sequence<m..>open range sequence<....>^ssequence concatenation (first or last arg has to be an explicit sequence for patterns)#s,length(s)head(s)tail(s)concat(s)set(s)convert sequence into set
COMMENTS
Section titled “COMMENTS”-- comment until end of line{- arbitrary comment -}
PRAGMAS
Section titled “PRAGMAS”transparent fwhere f is a unary function which will then on be ignored by ProB{-# assert_ltl "f" "comment" #-}where f is an LTL-formula and comment is an arbitrary comment, which is optional{-# assert_ctl "f" "comment" #-}where f is a CTL-formula and comment is an arbitrary comment, which is optional