Changes between Version 19 and Version 20 of IR2


Ignore:
Timestamp:
04/26/21 13:46:39 (5 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IR2

    v19 v20  
    3232          | 'ensures' expr ';'
    3333          ...
     34
    3435}}}
    3536
     
    6465type-list: type-name (',' type-name)* ;
    6566complete-type-name: type-specifier '*'* ('[' expr ']' | '(' type-list? ')')* ;
     67
    6668}}}
    6769
     
    7779* can you make types values? (reification)
    7880
     81===Statements===
     82
     83{{{
     84simple-statement:
     85    ';'  /* noop */
     86  | lvalue '=' expr ';'  /* assignment */
     87  | expr '(' arg-list? ')' ';'  /* function call */
     88  | (lvalue '=')? '$spawn' expr '(' arg-list? ')' ';'  /* process creation */
     89  | 'return' expr? ';'  /* return from function call */
     90  | '$parspawn' expr ',' expr ',' expr ';'
     91  | (lvalue '=')? '$malloc' '(' expr ',' expr ',' type-name ')' ';'
     92 
     93}}}
     94
     95Built-in functions:
     96{{{
     97void $assert( $bool asserted_expr, ... );  /* assertion with optional error message */
     98void $assume( $bool expr );  /* assumption */
     99void $wait( $proc p );  /* wait until p terminates */
     100void $waitall( $int nprocs, $proc * procs );  /* wait for all procs in list to terminate */
     101void $free( void * ptr );  /* frees something that was $malloc-ed */
     102}}}
     103