Changes between Version 30 and Version 31 of IR2
- Timestamp:
- 04/28/21 14:35:36 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
IR2
v30 v31 55 55 * a `$system` function has no definition in CIVL-IR, but is instead defined elsewhere (for example, in C or Java code). Such a function will always be executed atomically. The first string specifies a path (e.g., Java package) to the library containing the function, the second is the name of the library. These two Strings should be enough to tell CIVL where to find the system definition of the function. 56 56 * the `expr` in a guard must have type `$bool` 57 * add statement `$new`:58 57 59 58 {{{ … … 121 120 | 'return' expr? ';' /* return from function call */ 122 121 | '$parspawn' expr ',' expr ',' expr ';' /* parallel spawn */ 123 | (lvalue '=')? '$alloc' expr ',' expr ',' type-name';' /* heap allocation */122 | (lvalue '=')? '$alloc' '(' expr ',' expr ',' type-name ')' ';' /* heap allocation */ 124 123 arg-list: expr (',' expr)* ; /* actual argument list */ 125 124 … … 145 144 {{{ 146 145 expr: 147 $new type-name/* returns a new arbitrary value of the given type */146 $new(type-name) /* returns a new arbitrary value of the given type */ 148 147 | 149 148
