Changes between Version 28 and Version 29 of IR


Ignore:
Timestamp:
11/23/15 09:34:46 (10 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IR

    v28 v29  
    8989 * `T*` : pointer-to-T, subtype of above
    9090
    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.
     91Type 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
     97A **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.
    9498
    9599The expression `$typefrom(T)`, where `T` is a type name, returns a value of type `$type` representing the type `T`.
     
    97101The expression `$typeof(e)`, where `e` is an expression, returns the type of `e`, a value of type `$type`.
    98102
    99 The expression `$initval(d)` takes a `$type` value `d` and returns the initial value for an object of type `d`.
     103The 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.
    100104
    101105Example: