Changes between Version 141 and Version 142 of IR
- Timestamp:
- 02/04/16 14:36:19 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
IR
v141 v142 114 114 * `Integer` : the mathematical integers 115 115 * `Int[lo,hi,wrap]` 116 * `lo`, `hi` are concrete (?)integers, `wrap` is boolean116 * `lo`, `hi` are concrete integers, `wrap` is boolean 117 117 * 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. 118 118 * `lo` and `hi` can be any values of type `Integer`, so they are dynamic types, like complete array types 119 * The **real types**119 * The real types 120 120 * `Real` : the mathematical real numbers 121 121 * `Float[e,f]`, `e`, `f` are concrete integers, each at least 1. … … 195 195 196 196 Numeric 197 * 123, -123, 3.1415, etc. : values of type `Integer`, `Int`, `Real`, `Float`. **NEED TO BE MORE SPECIFIC** 197 * `-? digit+`: values of types `Integer` and `Int`: `[+|-]? digit+`, e.g., 123, -123 198 * `-? digit+ . digit+`: values of types `Real` and `Float`, e.g., 3.1415, -0.9875 198 199 * `add(e1,e2)` : numeric addition. 199 200 * `e1` and `e2` have the same numeric type. Note that there are no "automatic conversions" as there are in C. If the original expressions have different types, explicit conversions must be inserted. … … 221 222 222 223 Characters and Strings 223 * 'a', 'b', ... : Char values. **UNICODE?** 224 * 'a', 'b', ... : Char values. 225 * `\u00ea`, `\u00f1`, ...: Unicodes 224 226 * `string("abc")` : string literals 225 227 * value of type `Array[Char, n+1]`, where `n` is the length of the string (the last element is the character `\0`) … … 336 338 * `EVAL e;` : evaluates an expression `e` 337 339 * useful only because `e` might contain exceptions (e.g., array index out of bound, division by zero) 338 * `NOOP;` 340 * `NOOP;` or `NOOP LABEL;` 341 * a no-op can take an optional label, which is one of the following: 342 * TRUE_BRANCH_IF: to enter the true branch of a CIVL-C if-else statement; 343 * FALSE_BRANCH_IF: to enter the false branch of a CIVL-C if-else statement; 344 * LOOP_BODY_ENTER: to enter the body of a loop; 345 * LOOP_BODY_EXIT: to exit from the body of a loop. 339 346 * **Is there a need to add annotations for "true" or "false" branch, etc.?** If so, we can just make these parameters to the Noop. 340 347 * `RETURN;` and `RETURN e;`
