Changes between Version 141 and Version 142 of IR


Ignore:
Timestamp:
02/04/16 14:36:19 (10 years ago)
Author:
zmanchun
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IR

    v141 v142  
    114114  * `Integer` : the mathematical integers
    115115  * `Int[lo,hi,wrap]`
    116    * `lo`, `hi` are concrete (?) integers, `wrap` is boolean
     116   * `lo`, `hi` are concrete integers, `wrap` is boolean
    117117   * 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.
    118118   * `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
    120120  * `Real` : the mathematical real numbers
    121121  * `Float[e,f]`, `e`, `f` are concrete integers, each at least 1. 
     
    195195
    196196Numeric
    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
    198199* `add(e1,e2)` : numeric addition. 
    199200 * `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. 
     
    221222
    222223Characters and Strings
    223 * 'a', 'b', ... : Char values.  **UNICODE?**
     224* 'a', 'b', ... : Char values.
     225 * `\u00ea`, `\u00f1`, ...: Unicodes   
    224226* `string("abc")` : string literals
    225227 * value of type `Array[Char, n+1]`, where `n` is the length of the string (the last element is the character `\0`)
     
    336338* `EVAL e;` : evaluates an expression `e`
    337339 * 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.
    339346 * **Is there a need to add annotations for "true" or "false" branch, etc.?**  If so, we can just make these parameters to the Noop.
    340347* `RETURN;` and `RETURN e;`