Changes between Version 6 and Version 7 of IR
- Timestamp:
- 11/21/15 22:42:38 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
IR
v6 v7 34 34 * `$range` 35 35 * `$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? 38 39 * Integer types 39 40 * `$integer` : the mathematical integers 40 41 * `$int(lo,hi,wrap)` 41 * lo, hi are integers, wrap is a Boolean42 * lo, hi are integers, wrap is boolean 42 43 * 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. 43 44 * Real types 44 45 * `$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 47 47 * IEEE754 floating point numbers 48 * `struct ` types49 * list of name-type pairs50 * bit-widths?51 * `union ` types: similar to struct48 * `struct(T1,...,Tn)` 49 * Why do we need the field names? 50 * What about bit-widths? 51 * `union(T1,...,Tn)` : similar to struct 52 52 * `T[]` : array-of-T 53 * `T[n]` : array-of-length-n-of-T, subtype of above54 53 * `Function<S1,...,Sn;T>` 55 54 * `T*` : pointer-to-T … … 65 64 == Expressions == 66 65 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 67 79 * `e1+e2` : addition 68 80 * `e1-e2` : subtraction … … 73 85 * `*e` : pointer dereference 74 86 * `&e` : address-of 87 * `!e` : logical not 88 * `-e` : negative 75 89 * `(T)e` : cast expression 76 90 * 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 78 100 79 101 … … 95 117 96 118 97
