Changes between Version 6 and Version 7 of IR


Ignore:
Timestamp:
11/21/15 22:42:38 (10 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IR

    v6 v7  
    3434* `$range`
    3535* `$domain`
    36  * `$domain(Integer n)`
    37 * `enum` types
     36 * `$domain(n)`, n is an integer at least 1; subtype of above
     37* `enum` types.
     38 * different from integers or like C?
    3839* Integer types
    3940 * `$integer` : the mathematical integers
    4041 * `$int(lo,hi,wrap)`
    41   * lo, hi are integers, wrap is a Boolean
     42  * lo, hi are integers, wrap is boolean
    4243  * finite interval of integers [lo,hi].  If `wrap` is true then all operations "wrap", otherwise, any operation resulting in a value outside of the interval results in an exception being thrown.
    4344* Real types
    4445 * `$real` : the mathematical real numbers
    45  * `$float(e,f)`
    46  * e, f are integers
     46 * `$float(e,f)`, e, f are integers, each at least 1
    4747 * IEEE754 floating point numbers
    48 * `struct` types
    49  * list of name-type pairs
    50  * bit-widths?
    51 * `union` types : similar to struct
     48* `struct(T1,...,Tn)`
     49 * Why do we need the field names?
     50 * What about bit-widths?
     51* `union(T1,...,Tn)` : similar to struct
    5252* `T[]` : array-of-T
    53  * `T[n]` : array-of-length-n-of-T, subtype of above
    5453* `Function<S1,...,Sn;T>`
    5554* `T*` : pointer-to-T
     
    6564== Expressions ==
    6665
     66* literals
     67 * $true, $false
     68 * 123, -123, 3.1415, etc.
     69 * 'a', 'b', ... UNICODE?
     70 * `(T[]){e0, e1, ...}` : array literal
     71 * (S){e0, ...}` : tuple (struct) literal
     72 * `e1..e2`, `e1..e2#e3` : range literals
     73 * domain literals?
     74 * "abc" : string literals (array of char -- same as array literal?)
     75 * `$root`, `$here` (scope values)
     76 * `$self`, undefined process (proc value)
     77
     78* variable
    6779* `e1+e2` : addition
    6880* `e1-e2` : subtraction
     
    7385* `*e` : pointer dereference
    7486* `&e` : address-of
     87* `!e` : logical not
     88* `-e` : negative
    7589* `(T)e` : cast expression
    7690 * cast of integer to array-of-boolean, and vice-versa?
    77 *
     91* `e1==e2`, `e1!=e2`
     92* `e1&&e2`, `e1||e2`
     93* `e1?e2:e3`
     94* `e1<e2`, `e1<=e2`
     95* `e0(e1,...,en)` : pure function call?
     96* `$forall`, `$exists`
     97* `e1.i`, some natural number i (tuple read)
     98
     99
    78100
    79101
     
    95117
    96118
    97