UML 2.6 RTF Avatar
  1. OMG Issue

UMLR — UML 2.5: Property::isConsistentWith() error

  • Key: UMLR-424
  • Legacy Issue Number: 19726
  • Status: open  
  • Source: Simula Research Laboratory ( Bran Selic)
  • Summary:

    There appears to be an error in the Property::isConsistentWith() operation (page 155 of the 2.5 spec). As written, it looks like this (with a bit of my editing for readability) :

    isConsistentWith(redefiningElement : RedefinableElement) : Boolean

    {redefines RedefinableElement::isConsistentWith()}

    // The query isConsistentWith() specifies, for any two Properties in a context in which
    // redefinition is possible, whether redefinition would be logically consistent. A redefining
    // Property is consistent with a redefined Property if the type of the redefining Property
    // conforms to the type of the redefined Property, and the multiplicity of the redefining
    // Property (if specified) is contained in the multiplicity of the redefined Property.

    pre: redefiningElement.isRedefinitionContextValid(self)
    body: redefiningElement.oclIsKindOf(Property) and
    let prop : Property = redefiningElement.oclAsType(Property) in
    (prop.type.conformsTo(self.type) and
    ((prop.lowerBound()>notEmpty() and self.lowerBound()>notEmpty()) implies
    prop.lowerBound() >= self.lowerBound()) and
    ((prop.upperBound()>notEmpty() and self.upperBound()>notEmpty()) implies
    prop.lowerBound() <= self.lowerBound()) and
    (self.isComposite implies prop.isComposite))

    The problem is with the second last line, which should read:

    prop.upperBound() <= self.upperBound())

    Seems like a copy-paste error.

  • Reported: UML 2.5 — Fri, 20 Feb 2015 05:00 GMT
  • Updated: Fri, 6 Mar 2015 20:57 GMT