Changes between Version 43 and Version 44 of IR2


Ignore:
Timestamp:
04/28/21 18:14:37 (5 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IR2

    v43 v44  
    23231. **How to you translate between sequences and arrays?**
    24241. Can you make types values? (reification)
    25 1. `$depends_on`
    26251. read/write sets: function calls to start, stop monitoring reads/writes?  All part of mem library
    27 1. function calls for atomic enter/exit
    28261. a type for $state ?
    29271. How do you model `malloc` when the element type is not known?  (Create a type `$byte`?)
     
    5452block: '{' typedef* decl* function-definition* statement* '}' ;
    5553statement: block | simpleStmt | chooseStmt ;
    56 simpleStmt: label? guard? primitiveStmt gotoStmt? ;
     54simpleStmt: label? dependency? guard? primitiveStmt gotoStmt? ;
    5755chooseStmt: label? '$choose' '{' simpleStmt* '}' ;
    5856label: ID ':' ;
    59 guard: '$when' '(' expr ')' ; 
     57guard: '$when' '(' expr ')' ;
     58dependency: '$depends_on' '(' expression-list? ')'
     59expression-list: expr (',' expr)* ;
    6060gotoStmt: 'goto' ID ;
    6161contract-clause :
     
    8282* A program must contain a function definition for a function named `main`.
    8383* `$input` and `$output` can be used only on global variable declarations (not on function definitions, not in block scope).
    84 * the `expr` in a guard must have type `$bool`
     84* The `expr` in a guard must have type `$bool`.
     85* The expressions in a dependency clause must have pointer type.   This declares that the following transition depends only on the objects pointed to. 
    8586
    8687{{{
     
    145146  | lvalue '=' expr ';'  /* assignment */
    146147  | expr '(' arg-list? ')' ';'  /* function call */
    147   | (lvalue '=')? '$spawn' expr '(' arg-list? ')' ';'  /* process creation */
     148  | (lvalue '=')? '$spawn' expr '(' expression-list? ')' ';'  /* process creation */
    148149  | 'return' expr? ';'  /* return from function call */
    149150  | (lvalue '=')? '$alloc' '(' expr ',' expr ',' type-name ')' ';'  /* heap allocation */
    150 arg-list: expr (',' expr)* ;  /* actual argument list */
    151151
    152152}}}