OCL 2.3.1 RTF Avatar
  1. OMG Issue

OCL231 — OCL 2.3 Incomplete CollectionRange well-formedness rules

  • Key: OCL231-1
  • Legacy Issue Number: 15836
  • Status: closed  
  • Source: Model Driven Solutions ( Dr. Edward Willink)
  • Summary:

    The descriptions of CollectionRange are generally vague leaving the end inclusivities unclear.

    It is only the CollectionRangeEval::getRange that provides a solid definition of well-formedness
    for e.g. Sequence


    as equal to Sequence



    Unfortunately the specification is undecided about Sequence

    {2..1} since the CollectionRangeEval::getRange
    recursion never terminates.

    Rather than impose a well-formedness constraint that Sequence{2..1}

    is invalid, perhaps it should be
    made useful instead, by defining .. as operating in the direction of the last wrt the first so

    {2..1} = Sequence{2,1} and Set{1..2} = Set{2..1}

    = Set



  • Reported: OCL 2.3 — Thu, 18 Nov 2010 05:00 GMT
  • Disposition: Resolved — OCL 2.3.1
  • Disposition Summary:

    The generalization to allow down-counts can lead to nasty surprises for e.g. Sequence


    when x is empty. So just make it clear that Sequence


    is invalid

  • Updated: Fri, 6 Mar 2015 20:58 GMT