Changes between Version 65 and Version 66 of IR2


Ignore:
Timestamp:
05/03/21 22:23:51 (5 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IR2

    v65 v66  
    221221  | expr '&&' expr  /* logical and */
    222222  | expr '||' expr  /* logical or */
     223  | expr '==>' expr  /* logical implication */
    223224  | expr '==' expr  /* equality */
    224225  | '!' expr  /* logical not */
    225226  | expr '<' expr  /* less than */
    226227  | expr '<=" expr  /* less than or equal to */
    227   | expr '[' expr ']'  /* array or map read */
     228  | expr '[' expr ']'  /* array access */
    228229  | '(' expr ')'
    229230  | '-' expr  /* negative */
     
    234235  | '$exists' '(' decl expr? ')' expr  /* existential quantification */
    235236  | expr '?' expr ':' expr  /* if-then-else expression */
     237  | '$length' '(' expr ')'  /* length of array */
    236238  ;
    237239expr-pair-list: expr-pair (',' expr-pair)* ;
     
    285287<T> $int $seq_length( $seq<T> a ); // length of a
    286288<T> T $seq_get( $seq<T> a, $int i ); // get element i of a
    287 <T> $seq<T> $seq_set( $seq<T> a, $int i, T x ); // seq obtained by replacing element `i` of `a` with `x`
    288 <T> $seq<T> $seq_subseq( $seq<T> a, $int start, $int stop ); // subsequence from `start` to `stop-1`
    289 <T> $seq<T> $seq_add( $seq<T> a, T x ); // sequence obtained by adding element `x` to the end of `a`
    290 <T> $seq<T> $seq_append( $seq<T> a1, $seq<T> a2 ); //  sequence obtained by concatenating `a1` and `a2`
    291 <T> $seq<T> $seq_remove( $seq<T> a, $int i ); // sequence obtained by removing element at position `i` from `a`
    292 <T> $seq<T> $seq_insert( $seq<T> a, $int i, T x ); // sequence obtained by inserting element `x` at position `i` in `a`
    293 <T> void $seq_write( $int n, T * ptr, $seq<T> a );  // write the first `n` elements of `a` to `ptr`, `ptr+1`, ..., `ptr+n-1`.
    294 <T> $seq<T> $seq_read( $int n, T * ptr ); // form a sequence by reading `ptr`, `ptr+1`, ..., `ptr+n-1`.
     289<T> $seq<T> $seq_set( $seq<T> a, $int i, T x ); // seq obtained by replacing element i of a with x
     290<T> $seq<T> $seq_subseq( $seq<T> a, $int start, $int stop ); // subsequence from start to stop-1
     291<T> $seq<T> $seq_add( $seq<T> a, T x ); // sequence obtained by adding element x to the end of a
     292<T> $seq<T> $seq_append( $seq<T> a1, $seq<T> a2 ); //  sequence obtained by concatenating a1 and a2
     293<T> $seq<T> $seq_remove( $seq<T> a, $int i ); // sequence obtained by removing element at position i from a
     294<T> $seq<T> $seq_insert( $seq<T> a, $int i, T x ); // sequence obtained by inserting element x at position i in a
     295<T> void $seq_write( $int n, T * ptr, $seq<T> a );  // write the first n elements of a to ptr, ptr+1, ..., ptr+n-1
     296<T> $seq<T> $seq_read( $int n, T * ptr ); // form a sequence by reading ptr, ptr+1, ..., ptr+n-1
    295297
    296298}}}