mcrl — timed mCRL parser and (untimed) LPE generator
mcrl
[-linear
] [-tbf
] [-stdout
] [-regular
] [-regular2
] [-cluster
] [-nocluster
] [-binary
] [-multi
] [-newstate
] [-statenames
] [-help
] [-version
] file
.mcrl
This program checks the syntax
and the static semantics of a timed mCRL specification written in
, and with
proper flags transforms a subclass of untimed mCRL specifications
to linear process operators (LPEs).
This transformation is called linearization.
file
.mcrl
The tool mcrl checks whether a specification is
well-formed (timed)
mCRL.
An example of a well-formed
specification
is the Alternating Bit Protocol.
A mCRL specification is well-formed
if:
The specification is syntactically correct
All names in the specification (of sorts, functions, variables, actions, and processes) are appropriately declared
The sort Bool is declared, as are the two constructors
T
and F
of this sort
If the sort Time
is declared, both
time0
and le
are declared as
functions of this sort
All data-terms conform with the declarations (i.e. they are type correct)
Both data-terms of each equation are of the same sort
All conditions are of sort Bool
The term at the right-hand side of every @ operator is of sort
Time
If an action a
is renamed to
b
, b
is declared with
respect to all the domains of a
The sorts of all communicating actions match
The communications are defined in such way that communication is associative and commutative
There is not more than one initial process declared
.
The tool mcrl can also be used to translate a well-formed mCRL specification to a linear process equation provided that the specification meets the following requirements:
The process descriptions do not refer to time
(i.e. neither the @
nor the
<<
operator is used).
The left merge |_
and the
communication merge |
are not used to specify
processes.
Every process declaration must belong to one of the following syntactic categories:
Declarations in which action and process names are glued together
by means of the operators .
,
+
, <|
... |>
, and sum
Declarations in which process names are glued together
by means of the operators ||
,
hide
, encap
, and
rename
.
.
If this requirement is violated the lineariser will respond with
error message:
Mixing pCRL with mCRL operators
The operators ||
,
hide
, encap
, and
rename
are not used within the scope of the operators
.
,
+
, <|
... |>
, and sum
.
If this requirement is violated the lineariser will respond with
error message:
Parallel operator in the scope of pCRL operators
Recursion is guarded
There is no recursion at the level of the
||
,
hide
, encap
, and
rename
operators
The functions not
,
and
, and or
of sort Bool must be defined in the mCRL specification.
-linear
A human readable LPE of the input file is written to
file
.lin
-tbf
An LPE of the input file in toolbus term format is
written to file
.tbf
-stdout
An LPE in toolbus term format is generated, and written
to stdout
-regular
It is assumed that the input file is regular, and the output LPE will be generated in regular form
-regular2
A variant of regular where much more data variables are
being used. -regular2
is sometimes successful where
the use of -regular
leads to non termination of this tool
-cluster
All actions in the output are clustered
-nocluster
No actions are clustered, not even in intermediate LPEs
-binary
Use binary, instead of n-ary, case functions when clustering.
In the presence of -newstate
, state variables use
binary encoding.
-multi
Write the term before the final composition of LPEs
-newstate
Encode state variables using enumerated types.
-newstate
is only allowed in the presence of
-regular
or -regular2
.
Using the flag -binary
in addition
the state will be encoded by a vector of boolean variables.
By default (i.e. without -newstate), the functions
one
,
x2p1
and x2p0
will be used.
-statenames
Use meaningful names derived from the specification for the state variables
This language includes the Algebra of Communicating Processes
with abstraction and abstract data types.
The abstract data type consists of definitions of
constructors, operators and rewrite rules.
The data consists of sorted terms.
Processes can be described using the ordinary process operators:
+
, .
, or
, delta
, tau
, deltaH
, tauI
,
actions and recursive equations.
Extra features of mCRL provide interaction of data with processes:
Process variables and actions are supplied with parameters. The parameters of the process variables and actions can be instantiated with data terms of the right sort.
The process expression
p
<|
b
|>
q
where
p
and q
are processes, and
b
is a data term of sort Bool,
behaves like p
if b
is
equal to T
(true) and
behaves like q
if b
is equal
to F
(false).
This process expression requires that the sort Bool,
with constants T
,
and F
, is defined in each mCRL specification.
The sum operator
behaves like
sum
(e:E
,P(e))
P(e1)+P(e2)+
···
i.e. as
the choice between P(ei)
for any data term ei
taken from E
,
which may be infinite, where P
is a process term.
A Linear Process Equation, abbreviaton LPE, is in essence a vector
of typed process
parameters (abstract data types are specified in signature S
)
and a list of condition, action and effect triples that
describes when an action may happen, and what its effect is on the
vector of process parameters. Here an LPE is a special instance of a mCRL
process, namely
proc
P(d1:D1,...,
dn:Dn)=
sum (e11:E11
,...,
e1 m1:E1 m1 ,
a1 (f11 ,...,
f1 k1) .
P(g11 ,...,
g1n)
<| h1 |> delta ) +
|
. |
sum (ei1:Ei1
,...,
ei mi:Ei mi ,
ai(fi1 ,...,
fi ki) .
P(gi1 ,...,
gin)
<| hi |> delta ) +
|
. |
sum (em1:Em1
,...,
em mm:Em mm ,
am (fm1 ,...,
fm km) .
P(gm1 ,...,
gmn)
<| hm |> delta )
|
in which
n,m,mi,ki
Respectively number of process parameters, number of summands,
number of sumvariables in summand
, and number of action arguments in
summand i
i
Di
,
Eij
Abstract Data Types
di
,
eij
Process parameter of sort
,
respectively sumvariable of sort
Di
Eij
ai(fi1 ,...,
fi ki)
Parametrized action with
action name ai
data term
in fij
T[S,
{d1 ,...,
dn,ei1 ,...,
ei mi}
]
gij
Process argument
, which is a data term
in gij
T[S,
of sort
{d1 ,...,
dn,ei1 ,...,
ei mi}
]Dj
hi
Condition
, which is a data term
in
hi
T[S,
of sort Bool
{d1 ,...,
dn,ei1 ,...,
ei mi}
]
,and a vector of closed data terms, whose sorts are one by one equal to the sorts of the process parameters. This vector of closed data terms defines the initial state. An LPE can be seen as an inductive definition of a state space, which belongs to the process described by the mCRL specification.