UML 2.5 FTF Avatar
  1. OMG Issue

UML25 — The current criteria used in UML for BehavioralFeature::isDistinguishable() is insufficient in practice

  • Key: UML25-520
  • Legacy Issue Number: 18727
  • Status: closed  
  • Source: NASA ( Dr. Nicolas F. Rouquette)
  • Summary:

    The current criteria only looks at the ordered collection of owned parameter types as a key for distinguishing behavioral features.
    For example, it means that, for UML, the following pairs of operations of the same name are not distinguishable:

    // difference in the parameter direction
    op1(String)
    op1():String

    // difference in the parameter effect
    op2(update String)
    op2(delete String)

    // difference in the parameter exception
    op3(Throwable)
    op3() throws Throwable

    // difference in the parameter collection characteristics
    op4(Set(String))
    op4(String[1])

    This means that UML is not able to represent some well-known programming languages where the above characteristics contribute to the signature of distinguishable operations (e.g., C, C++, Java, C#, …)

    This can be easily fixed.

    In the OCL for BehavioralFeature::isDistinguishableFrom(), replace:

    ...>isUnique(ownedParameter>collect(type))

    With:

    …>isUnique(ownedParameter>collect(p|Tuple

    {name=p.name, type=p.type,effect=p.effect,direction=p.direction,isException=p.isException,isStream=p.isStream,isOrdered=p.isOrdered,isUnique=p.isUnique,lower=p.lower,upper=p.upper}

    ))

    Since BehavioralFeature::ownedParameter is an ordered collection, the current definition constructs an ordered collection of the owned parameter types as a key for distinguishing BehavioralFeatures.

  • Reported: UML 2.5b1 — Wed, 22 May 2013 04:00 GMT
  • Disposition: Resolved — UML 2.5
  • Disposition Summary:

    agreed

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