Changes between Version 28 and Version 29 of IR
- Timestamp:
- 11/23/15 09:34:46 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
IR
v28 v29 89 89 * `T*` : pointer-to-T, subtype of above 90 90 91 Type names: 92 93 A type name is a syntactic element that names a type, together with possibly more information that makes the type "complete". All of the names listed above are type names, such as `int[]`, but so is `int[n*m]`. This is the same as in C. 91 Type facts: 92 93 **Pure types** contain no values anywhere in the type tree. That is, there is no array length expression in the type. The pure types are the static types of the CIVL-IR. Each variable is declared to have some pure type. 94 95 **Augmented types** include all the pure types plus possible length expressions. 96 97 A **type name** is a syntactic element that names a (pure or augmented) type Examples include `int[]` and `int[n*m]`. This is the same as in C. 94 98 95 99 The expression `$typefrom(T)`, where `T` is a type name, returns a value of type `$type` representing the type `T`. … … 97 101 The expression `$typeof(e)`, where `e` is an expression, returns the type of `e`, a value of type `$type`. 98 102 99 The expression `$initval(d)` takes a `$type` value `d` and returns the initial value for an object of type `d`. 103 The expression `$initval(d)` takes a `$type` value `d` and returns the initial value for an object of type `d`. The initial value of `$integer` and other primitive (non-compound) types is "undefined". The initial value of `$integer[]` is an array of length 0 of `$integer`. The initial value of `$real*` is the undefined pointer to `$real`. The initial value of `$real[10]` is the array of length 10 in which each element is undefined. In general, the initial value of an array of length n is the sequence of length n in which every element is the initial value of the element type of the array. The initial value of a structure is the tuple in which each component is assigned the initial value for its type. 100 104 101 105 Example:
