-
Key: OCL25-168
-
Legacy Issue Number: 14639
-
Status: open
-
Source: Model Driven Solutions ( Dr. Edward Willink)
-
Summary:
The iterators of LoopExp and LoopExpEval are not ordered, but the well-formedness constraints on them use ->at() which is only available for ordered collection. Usage of the AST property is subject to a variety of spelling, ordering and multiplicity inconsistencies.
Section 7.6.3 and 7.6.4 define extended variants of forAll and exists that have two iterators.Figure 8.2 and Figure 13.3 show an unordered * multiplicity for LoopExp.iterator. The positioning of the VariableExp.referredVariable 0..1 multiplicity makes the diagram easy to mis-read.
Section 8.3.1 LoopExp defines iterator as "The iterator variables. These variables are, each in its turn, " implying an ordered collection.
Section 8.3.7 LoopExp [2] and [3] use iterator->forAll implying a collection.
Section 9.3 IteratorExpCS synthesized attributes use iterators->at(1) and at(2) requiring an ordered collection.
Section 9.3 IterateExpCS concrete syntax supports at most one iterator and one accumulator.
Section 9.3 IterateExpCS synthesized attributes use iterator.initExpression requiring a non-collection.
Figure 10.7 shows LoopExpEval.iterators as unordered 1..n.
Section 10.3.1 LoopExpEval defines iterators as "The names of the iterator variables".
Section 10.3.7 IterateExpEval [1] uses iterators->at(1) and iterators->at(2) implying an ordered collection with upper bound 2.
Section 10.3.7 LoopExpEval [1] has a two way if = 1 else, implying the upper bound is 2.
Section 10.3.7 LoopExpEval [3] uses iterators->at(1) and iterators->at(2) implying an ordered collection with upper bound 2.
Section 11.9.1 defines the mapping of forAll to iterate for multiple iterators, but IterateExpCS only supports a single iterator.
The above suggests that the specification should consistently treat iterators as having a 1..2
{ordered}multiplicity.
-
Reported: OCL 2.1 — Sun, 15 Nov 2009 05:00 GMT
-
Updated: Thu, 8 Oct 2015 14:12 GMT
OCL25 — OCL 2.1 Loop iterators are not ordered and other inconsistencies
- Key: OCL25-168
- OMG Task Force: Object Constraint Language 2.5 RTF