SCM(5) | Local Manual | SCM(5) |
For model-checking purposes, the format also permits the specification of a set of bad configurations.
scm ident :
nb_channels = integer ;
The set of channels is {0, ..., n-1} where n is the number of channels. By default, all channels are perfect.
[lossy : integer [, integer ...]]
parameters : [{int | real} ident [= expr] ; ...]
The alphabet is the same for all channels. Each message holds a typed numerical value.
automaton ident :
[{int | real} ident [= expr] ; ...]
initial : integer [, integer ...]
state integer : [to integer : command ; ...]
where command is of the following form:
when cond [, integer {! | ?} ident] [with ident = expr [, ident = expr ...]]
bad_states : ( automaton ident : badlocal ... [with regexp] ) ...
where badlocal is of the following form:
in integer : cond ...
The local constraints in a badlocal specification are disjuncted together. The badlocal specifications in a bad_states declaration are conjuncted together.
The queue contents are represented by a regular expression regexp as defined below.
regexp | ::= | _ | # | a for a in the message alphabet |
| regexp . regexp | ( regexp | regexp ) | ||
| regexp ^* | regexp ^+ |
The operators on regular expressions are interpreted as usually: . stands for concatenation, | for disjunction, ^* is the reflexive-transitive closure, and ^+ the transitive closure. The empty word is denoted by _ .
The symbol # is interpreted as separator for channels in regexp. Each word matched by regexp must contain exactly n-1 occurrences of # where n is the number of channels.
scm connection_disconnection : nb_channels = 2 ; parameters : real o ; real c ; real d ; automaton sender : initial : 0 state 0 : to 1 : when true , 0 ! o ; state 1 : to 0 : when true , 0 ! c ; to 0 : when true , 1 ? d ; automaton receiver : initial : 0 state 0 : to 1 : when true , 0 ? o ; state 1 : to 0 : when true , 0 ? c ; to 0 : when true , 1 ! d ; bad_states: (automaton receiver: in 0 : true with c.(o|c)^*.#.d^*)
This scm model has two channels, with message alphabet {o, c, d}. There are two automata, a sender and a receiver. Their states and transitions should be self-explanatory. Bad configurations are those where (a) the receiver is in local state 0, and (b) channel contents are in the regular expression detailed below.
The regular expression c .( o | c )^*. # . d ^* is interpreted as the set of contents of two channels:
September 14, 2011 | Linux 3.2.0-3-amd64 |