-
Key: OCL25-127
-
Legacy Issue Number: 14980
-
Status: open
-
Source: Model Driven Solutions ( Dr. Edward Willink)
-
Summary:
The OrderedSet well-formedness constraints in 11.7.3 appear to have been
copied and pasted from Sequence. They need revision to consider the Set
consequences of .Addition operations (includes, insertAt, union, append, prepend) have a
post-condition that the size increases, which is clearly not the case if
an additional element is equal to a pre-existing element.In the particular case of insertAt there is an ambiguity as to whether
{1, 2, 3, 4, 5, 6}
the insert index is the pre or post index. For instance when inserting 3
at index 5 into OrderedSetthe pre-index insertion
{1,2,4,3,5,6}
yields OrderedSetwhereas the post-index insertion yields
{1,2,4,5,3,6}
OrderedSet. While the post-index insertion satisfies the
'post: result->at(index) = object' constraint, it is presumably not the
intent. -
Reported: OCL 2.1 — Sun, 17 Jan 2010 05:00 GMT
-
Updated: Thu, 8 Oct 2015 14:12 GMT
OCL25 — OCL 2.1 11.7.3 OrderedSet addition well-formedness rules
- Key: OCL25-127
- OMG Task Force: Object Constraint Language 2.5 RTF