== CIVL IR == Language principles: * CIVL-IR is a subset of CIVL-C. A CIVL-IR program is a CIVL-C program, and has the same semantics. Types: * `$bool` : boolean type ($true and $false, unrelated to integers) * `$char` : character type (Unicode characters, unrelated to integers) * `$int` : mathematical integers * `$real` : mathematical reals * `$float` : IEEE floating-point numbers e=significand bits, f=exponent bits * `$herbrand` : Herbrand type of non-Herbrand numeric type T * `$proc` : process type * `$bundle`: bundle type for sequence of any type (same as seq?) * `$heap` : heap type, for dynamic allocation * `$range` : regular sequence of integers * `$domain` : tuple of ranges * `$mem` : set of memory locations * `enum tag` : enumerated type * `struct tag` : structured type * `union tag` : union type * `T[]` : array of T * `void *` : pointer to anything * `T *` : pointer to T * `T(T1, ..., Tn)` : function consuming T1, ..., Tn and returning T * `$seq` : sequence of T * `$set` : set of T * `$map` : map from T1 to T2 * `$rel` : relation, set of n-tuples Notes * the difference between the array type and the sequence type is that elements of an array are addressable, i.e., one can form a pointer such as `&a[i]`. This is not possible with sequences, sets, maps, or relations. * the difference between the function type and map type: a function is really a procedure in the language, so it can modify the state as well as return a value. A map is a logical partial function: it is defined on some subset of the domain type, it will always "return" the save value on a given input, it cannot modify the state. Questions * how to allocate an array * how to initialize a variable (what are initial values?) * how to go between sequences and arrays * can you make types values? (reification)