Changes between Version 116 and Version 117 of IR2


Ignore:
Timestamp:
06/04/21 08:49:49 (5 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IR2

    v116 v117  
    1717
    18181. **Do variables have default initial values?**
    19   * An object variable may or may not include an explicit initializer.   If it does not include an initializer, it is the same as if the initializer were `$new(T)`, where `T` is the type of the variable.  Even in this case, the variable has some unspecified value of its type.   Details are below.
     19  * An object variable may or may not include an explicit initializer.   If it does not include an initializer, the variable is initialized with an undefined value.  Even in this case, the variable has some unspecified value of its type, but its "defined" bit is false.
    20201. **How do you initialize a variable?**
    2121  * In the declaration.   For example `$int n=$fresh($int);` will initialize `n` with an arbitrary integer, while `$int n=$new($int);` will initialize `n` with an undefined integer, and `$int n=0` will initialize `n` with `0`.
     
    2727  * There are functions in the standard library to do that.
    28281. ** Can you make types values? (reification)**
    29   * For now, no.   There are several statements and expressions which do take a type name as an argument, but there is no way for one to define new expressions or functions that do that.
     29  * Yet, using `$typeof(T)` which returns a value of type `$type<T>`.
    30301. ** How do you monitor reads and writes?**
    31   * There are functions in the standard library (`mem.h`) for this.
     31  * There are functions in the standard library (`mem.h`) for this. [TODO]
    32321. **Is there a type for $state ? **
    33   * Coming soon.
     33  * Coming soon. [TODO]
    34341. **How do you model `malloc` when the element type is not known?**
    35   * For now, you can't.  [Note to self: consider creating a type like `$byte` for this purpose?]
     35  * There will be a general`$object` type. [TODO]
    36361. **How do you iterate over a domain?**
    37   * Coming soon.
     37  * [TODO]
    38381. ** Bitvectors? **
    39   * Coming soon.
     39  * [TODO]
    4040
    4141== Grammar ==