mCRL2 Syntax Definition
This document describes the syntax of mCRL2 expressions and specifications. We present the syntax in a rich text format. In Table of Symbols a translation of rich text to plain text is given, which is needed for using the toolset.
Throughout this document, suggestive dots (,
) are used to indicate repeating patterns with one or more
occurrence. Furthermore,
distinguishes alternatives (not to be
mistaken with the pipe
),
indicates one or more occurrences
of
, and
indicates zero or more occurrences
of
.
As opposed to real EBNF, we do not use quotes to separate the terminals from the
non-terminals.
Lexical Syntax
We define the notions of identifiers, numbers, whitespace and comments:
An identifier is a string matching the pattern
, excluding the following reserved words:
sort cons map var eqn act glob proc pbes init struct Bool Pos Nat Int Real List Set Bag true false if div mod in lambda forall exists whr end delta tau sum block allow hide rename comm val mu nu delay yaled nil
Identifiers are used for representing sort names
, function names
, data variable names
, action names
, process reference names
, and propositional variable names
.
A number is a string that matches the pattern
or
.
Spaces, tabs and newlines are treated as whitespace.
A
-sign indicates the beginning of a comment that extends to the end of the line.
Data Specifications
Sort expressions :
Here and
stand for the constructor and projection functions
of a structured sort. The binary operator
associates to the right.
Data expressions :
Here stands for a multiple data variable declaration,
for a
binary operator, and
for a number. The unary operators have the highest priority,
followed by the infix operators, followed by
,
and
, followed by
. The descending order of precedence of
the infix operators is:
,
,
,
,
,
,
,
,
,
.
Of these operators
,
,
,
,
,
,
,
,
and
associate to the
left and
,
,
,
and
associate to the right.
Data specifications :
Here, stands for sort declaration,
for multiple function
declaration,
for equation declaration, and
for action
declaration.
Process Specifications
Process expressions :
Here, and
stand for data expressions of sort
and
, respectively. For technical reasons,
and
may not have an
infix operator, a where clause or a quantifier at the top-level (parentheses should be used
instead).
represents an action sequence,
an action renaming,
and
an action communication. The descending order of precedence of the
operators is:
,
,
,
,
,
,
,
. Of these operators
,
,
,
and
associate to the right.
Process specifications :
Here represents a process specification element,
a process definition, and
an action declaration. Furthermore, we impose the
restriction that
should contain precisely one occurrence of the
keyword
.
Mu-calculus Formulae
Multiactions :
Here, represents a parameterised action.
Action formulae :
Here, and
stand for data expressions of sort
and
, respectively. For technical reasons,
may not have an infix
operator, a where clause or a quantifier at the top-level (parentheses should be used
instead). The descending order of precedence of the operators is:
,
,
,
,
. Of the infix operators
associates to the
left and
,
and
associate to the right.
Regular formulae :
The postfix operators and
have the highest priority, followed
by
, followed by infix
. The infix operators associate to the right.
State formulae :
Here stands for a data variable declaration and initialisation, and
and
stand for data expressions of sort
and
,
respectively. For technical reasons,
may not have an infix operator, a where clause
or a quantifier at the top-level (parentheses should be used instead). The descending order
of precedence of the operators is:
,
,
,
.
The infix operators
,
and
associate to the right.
PBES’s
Parameterised boolean expressions :
Here stands for a propositional variable occurrence. The descending order of
operator precedence is:
,
,
,
. The infix operators
,
and
associate to the right.
Parameterised boolean equations :
Here stands for a fixpoint symbol, and
for a propositional
variable declaration.
PBES specifications :
Here represents a PBES specification element. We impose the
restriction that
should contain precisely one occurrence of each of
the keywords
and
.
Table of Symbols
In the toolset, a plain text format is used as opposed to the rich text format of the previous sections. A mapping from rich text to plain text symbols is provided below.
Symbol |
Rich text |
Plain text |
|---|---|---|
arrow |
|
|
cross |
|
|
diamond |
|
|
standard sorts |
|
|
equality and inequality |
|
|
logical operators |
|
|
relational numeric operators |
|
|
relational set operators |
|
|
set operators |
|
|
list operators |
|
|
lambda abstraction |
|
|
universal quantification |
|
|
existential quantification |
|
|
deadlock |
|
|
internal action |
|
|
left merge |
|
|
sum |
|
|
allow |
|
|
block |
|
|
hide |
|
|
rename |
|
|
communication |
|
|
time |
|
|
negation of ultimate delay |
|
|
ultimate delay |
|
|
nil |
|
|
fixpoint symbol |
|
|
maximal fixpoint |
|
|
minimal fixpoint |
|