It is important to note that only indices that are statically computable are allowed. This means if an id appears in the math, the object is refers to should be constant. Even with this implication, determining whether an index goes out of bounds is not easy. Right now, I assume that every index math is monotonically increasing. This way I just need to compute the end points for that function. However, this is not always true. A function may have selectors, piecewise function, trigonometric, and etc, so the bounds can be anywhere in between the end points. This means that all the points must be evaluated.
As of revision 20642, I have done validation for the following rules:
10206, 1207, 1208, 10209, 10210, 20103, 20104, 20107, 20108, 20111, 20112, 20114, 20202, 20204, 20205, 20302, 20305, 20307, 20308.
There are two rules that says Dimension and Index objects can only have attribute arrayDimension set to 0, 1, or 2, but since it is likely this limitation will be removed in a later version, I am not checking for these rules.
This week, I am going to do more testing for validation. In addition, I need to implement one validation rule that checks that binary and nary operations have arguments that match in number of dimensions (rule 10211). In addition, I am going to start thinking about the pseudocode for the flattening routine.