Changes between Version 69 and Version 70 of IR2
- Timestamp:
- 05/04/21 13:17:37 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
IR2
v69 v70 77 77 === Notes === 78 78 79 * A typedef can be used to define parameterized types. The type parameters are listed between angular brackets preceding the typedef. When the identifier is later used, it must be used with angular brackets and actual type names to replace the type parameters. 79 80 * A declaration declares a variable to have either an object type or a function type. (An object type is any type that is not a function type.) 81 * The optional type-param-list in a declaration may be applied to declaration of function type only. It declares a "generic" function. When the function is called (or spawned), the call must include the angular brackets with a list of type names that replace the type parameters used in the declaration or definition of the function. 80 82 * A variable of function type represents either an abstract or a system function. The declaration of such a variable must use either the qualifier `$abstract_f` or `$system_f`. Moreover, those two qualifiers can only be used in a declaration of function type. 81 83 * An abstract function represents a new uninterpreted pure function. … … 89 91 * The `expr` in a guard must have type `$bool`. 90 92 91 {{{92 int a[];93 void main() {94 a = (int[10])$lambda(int i; $undefined);95 a = $new(int[10]); //96 ... initialized a somehow ...97 $assume($defined(a, 0, 10)); // ?98 99 }}}100 93 101 94 == Contracts == … … 122 115 {{{ 123 116 type-specifier: 124 ID /* typedef use or type parameter*/117 ID ('<' type-list '>')? /* type parameter or (possibly parameterized) typedef use */ 125 118 | '$int' /* mathematical integers */ 126 119 | '$bool' /* boolean type ($true and $false, unrelated to integers) */
