Download STeP The Stanford Temporal Prover Educational Release USER`S
Transcript
CHAPTER 2. SYSTEMS AND SPECIFICATIONS 14 j j j j range ::= basety ::= j j channel [1 .. [ range ] type * type + ( type ) expn .. expn bool int rat f int-const ] of type g bounded asynchronous channel range type tuple type parenthesized type range boolean type integer type rational type The type constructor has higher precedence than all other type constructors. Thus, the type channel [1..] of bool * int * int is parsed as channel [1..] of (bool * int * int). Note that (bool * int * int), ((bool * int) * int) and (bool * (int * int)) are three dierent types. New underspecied types, datatypes and enumeration types can be declared in specication les; see Section 2.4.1. 2.2 Expressions Expressions are constructed from constants, identiers, function application, array references, tuple expressions, binary inx expressions, prex expressions and quantication. The following well-formedness constraints are imposed: The boolean type is treated as a subtype of the integers, where the boolean value corresponds to the integer value 0, and true corresponds to 1. Therefore any expression of boolean type can be used in an integer context. This is referred to as arithmetization.1 Similarly, the integers (type int) are treated as a subtype of rationals (type rat). false The operators /\ (conjunction), \/ (disjunction), --> (implication), <-->, (bi-implication), !, ~ (negation), and the temporal operators Until, Awaits, Since, Backto, ==>, <==>, (), [], <>, (-), [-], <-> take boolean arguments, and the resulting ex- pression is of type boolean. The operators +,-,* require integer or rational arguments and produce a value of the corresponding type. Division / requires arguments of type integer or rational, and results in a value of type rational. The operators mod and div require arguments of type integer and result in a value of type integer. 1 Users should note that this arithmetization is very convenient, but at times confusing, see Section 2.7.