Table of Contents

REACH language

The language REACH is used for specifying reachability properties. Using a language for specifying properties has the following advantages:

For example, the following alternative REACH predicates express the deadlock property:

// each transition has a place in its preset that is not marked
// (and so the transition is not enabled)
forall t in TRANSITIONS { 
  exists p in pre t { ~$p }
}
// all transitions are not enabled
forall t in TRANSITIONS { ~@t }

Comments

C++-style comments are supported:

Type system

Each value belongs to one of the following types:

The types are never mentioned explicitly, but rather derived from the structure of the sub-expression.

Constants

Names (identifiers)

Built of English letters, digits and '_', not starting with a digit, case sensitive.

Pre-defined names

Unary operators

Binary operators

Indexing and conditional operators

Multi-operand operators

Iterators

The s.t. clause is optional. The var can be replaced by a tuple pattern, e.g.:

forall ((x,),,y) in { ((1,2),3,4), ((5,6),7,8) } { x<y }  /* evaluates to true as 1<4 and 5<8 */

The identifiers within a tuple pattern must be distinct.

Name declaration

Operator precedence and associativity

The precedence of operators in the decreasing order is as follows. The associativity is specified in parentheses wherever relevant. Some binary operators are non-associative, i.e. A op B op C is a syntax error.