Changes between Initial Version and Version 1 of LanguageSubset


Ignore:
Timestamp:
07/17/13 19:14:50 (13 years ago)
Author:
zirkel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • LanguageSubset

    v1 v1  
     1== Types ==
     2* boolean
     3* int
     4* double
     5* $proc : The process type.
     6* $scope : The scope type.
     7
     8== Expressions ==
     9
     10* +, - , * , / , %
     11* =
     12* ==, <=. >=, <, >
     13* ++, --
     14* $true, $false
     15* $self : The process invoking the expression (constant of type $proc).
     16* $spawn f(e1, ..., e_n) : Spawn a process executing f on (e1, ..., e_n), return a reference to the process.
     17* function calls
     18
     19== Statements ==
     20* Expression statement : Use an expression as a statement (e.g. i++;).
     21* if-then-else statements : Same syntax as C.
     22* while, for loops
     23* $assert <expr> : Check that <expr> holds.
     24* $assume <expr> : Add <expr> to the path condition.
     25* $wait <expr> : For <expr> of type $proc, block until <expr> terminates.
     26* $when (<expr>) S; : Guarded statement.  Block until <expr> is true, then execute S.
     27* $choose : A $choose statement has the form
     28{{{
     29  $choose {
     30  stmt1;
     31  stmt2;
     32  ...
     33  default: stmt
     34}
     35}}}
     36The "default" clause is optional.
     37The guards of the statements are evaluated and among those that are
     38true, one is chosen nondeterministically and executed.  If none are
     39true and the default clause is present, it is chosen.  The default
     40clause will only be selected if all guards are false.  If no default
     41clause is present and all guards are false, the statement blocks.
     42Hence the implicit guard of the $choose statement without a default
     43clause is the disjunction of the guards of its sub-statements.
     44The implicit guard of the $choose statement with a default clause
     45is "true".