OCL 2.5 RTF Avatar
  1. OMG Issue

OCL25 — OCL 2.1 11.7.3 OrderedSet addition well-formedness rules

  • Key: OCL25-127
  • Legacy Issue Number: 14980
  • Status: open  
  • Source: Model Driven Solutions ( Ed 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
    the insert index is the pre or post index. For instance when inserting 3
    at index 5 into OrderedSet

    {1, 2, 3, 4, 5, 6}

    the pre-index insertion
    yields OrderedSet


    whereas the post-index insertion yields


    . While the post-index insertion satisfies the
    'post: result->at(index) = object' constraint, it is presumably not the

  • Reported: OCL 2.1 — Sun, 17 Jan 2010 05:00 GMT
  • Updated: Thu, 8 Oct 2015 14:12 GMT