UML 1.4 MAILINGLIST Avatar
  1. OMG Issue

UML14 — 2) Page 2-49, additional operation #7 for Classifier

  • Key: UML14-2
  • Legacy Issue Number: 3531
  • Status: closed  
  • Source: David Frankel Consulting ( David Frankel)
  • Summary:

    2) Page 2-49, additional operation #7 for Classifier: The OCL reads as
    follows:

    1 oppositeAssociationEnds : Set (AssociationEnd);
    2 oppositeAssociationEnds =
    3 self.association->select ( a | a.associationEnd->select ( ae |
    4 ae.type = self ).size = 1 )->collect ( a |
    5 a.associationEnd->select ( ae | ae.type <self ) )->union
    6 (
    7 self.association->select ( a | a.associationEnd->select ( ae |
    8 ae.type = self ).size 1 )->collect ( a |
    9 a.associationEnd) )

    In line 5, the expression 'ae.type <self' is clearly wrong. I believe the
    intention may have been to test for inequality, i.e. 'ae.type <> self'.

    In line 8 'size 1' doesn't parse. I'm not sure what the intent was.

    A greater concern is that, even if corrected to address these flaws, this
    logic doesn't seem right in the case where we are dealing with an
    association where both ends are of the same type. It appears to be relying
    on detecting whether an end is opposite by testing the end's type. A fair
    number of other well-formedness rules leverage this operation in one way or
    another, so they are affected by this apparent flaw. Correcting this would
    require comparing the end instances, i.e. something like 'ae <> self' which
    does not have the same problem as 'ae.type <> self'.

  • Reported: UML 1.3 — Mon, 27 Mar 2000 05:00 GMT
  • Disposition: Resolved — UML 1.4
  • Disposition Summary:

    This issue has been fixed in UML 1.4. The correct operator is "<>"

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