Changes between Version 30 and Version 31 of IR2


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

--

Legend:

Unmodified
Added
Removed
Modified
  • IR2

    v30 v31  
    5555* 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.
    5656* the `expr` in a guard must have type `$bool`
    57 * add statement `$new`:
    5857
    5958{{{
     
    121120  | 'return' expr? ';'  /* return from function call */
    122121  | '$parspawn' expr ',' expr ',' expr ';'  /* parallel spawn */
    123   | (lvalue '=')? '$alloc' expr ',' expr ',' type-name ';'  /* heap allocation */
     122  | (lvalue '=')? '$alloc' '(' expr ',' expr ',' type-name ')' ';'  /* heap allocation */
    124123arg-list: expr (',' expr)* ;  /* actual argument list */
    125124
     
    145144{{{
    146145expr:
    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 */
    148147  |
    149148