Changes between Version 75 and Version 76 of IR2
- Timestamp:
- 05/06/21 09:39:04 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
IR2
v75 v76 118 118 {{{ 119 119 type-specifier: 120 ID ('<' type-list '>')? /* type parameter or (possibly parameterized) typedef use */120 ID type-args? /* type parameter or (possibly parameterized) typedef use */ 121 121 | '$int' /* mathematical integers */ 122 122 | '$bool' /* boolean type ($true and $false, unrelated to integers) */ … … 135 135 | '$set' '<' type-name '>' /* set of T */ 136 136 | '$map' '<' type-name ',' type-name '>' /* partial function from T1 to T2 */ 137 | '$rel' '<' type-list '>'/* relation: set of n-tuples with specified component types */137 | '$rel' type-args /* relation: set of n-tuples with specified component types */ 138 138 ; 139 139 declarator '*'* direct-declarator ; … … 145 145 ; 146 146 type-name: ... /* same as declarator but without the ID */ 147 type- list: type-name (',' type-name)*;147 type-args: '<' type-name (',' type-name)* '>'; 148 148 parameter-type-list: type-specifier declarator (type-specifier declarator)* ; 149 149 150 }}} 150 151 … … 167 168 ';' /* noop */ 168 169 | lvalue '=' expr ';' /* assignment */ 169 | (lvalue '=')? expr type-arg -list? '(' arg-list? ')' ';' /* function call */170 | (lvalue '=')? '$spawn' expr type-arg -list? '(' expression-list? ')' ';' /* process creation */170 | (lvalue '=')? expr type-args? '(' expression-list? ')' ';' /* function call */ 171 | (lvalue '=')? '$spawn' expr type-args? '(' expression-list? ')' ';' /* process creation */ 171 172 | '$wait' expr ';' /* wait until p terminates */ 172 173 | 'return' expr? ';' /* return from function call */ … … 179 180 | '$assume' expr ';' /* assumption */ 180 181 ; 181 type-arg-list: '<' type-list '>' ;182 182 183 183 }}} … … 225 225 | '*' expr /* pointer dereference */ 226 226 | '&' lvalue /* address-of */ 227 | expr '(' expression-list? ')' /* application of abstract function (and perhaps other functions?) */227 | expr type-args? '(' expression-list? ')' /* application of abstract function (and perhaps other functions?) */ 228 228 | $new(type-name) /* returns a new arbitrary value of the given type */ 229 229 | '$forall' '(' decl expr? ')' expr /* universal quantification */
