| | 1 | |
| | 2 | = Multiple Changes to CIVL Code = |
| | 3 | |
| | 4 | == Model Changes == |
| | 5 | |
| | 6 | * introduce !LHSExpression, a subtype of !Expression |
| | 7 | * rename !ArrayIndexExpression to !SubscriptExpression |
| | 8 | * modify !ModelBuilder to get rid of arrow expressions, replacing them with dot of star |
| | 9 | * modify !ModelBuilder to get rid of C's pointer-array pun: |
| | 10 | ** in any subscript expression `a[i]`, make sure `a` has array type. If it doesn't, translate to `*(a+i)` |
| | 11 | ** in any place where a pointer is called for, but instead an array `a` is used, replace `a` with `&a[0]`. Examples include pointer arithmetic (`a+i`, `a-b`), argument to dereference operator `*`, actual arguments in function calls where the corresponding parameter has pointer type. |
| | 12 | ** make sure the parameter type of a function call is never an array type. ABC should already be doing this. |
| | 13 | * use an enumerated type like ExpressionKind for the different kinds of expressions, so `switch` statements can be used |
| | 14 | * add a method to expressions like `SymbolicExpression getConstantValue()` and a corresponding setter, to cache the value of any expression that has a constant value, such as a literal expression |
| | 15 | |
| | 16 | |
| | 17 | == Semantics Changes == |