UML 2.5 FTF Avatar
  1. OMG Issue

UML25 — UML2.5 issue: incorrect use of oclKindOf()->notEmpty()

  • Key: UML25-498
  • Legacy Issue Number: 18465
  • Status: closed  
  • Source: Model Driven Solutions ( Mr. Steve Cook)
  • Summary:

    There is a systematic error in the OCL in Clause 17. There are many erroneous expressions of the form x.oclIsKindOf(T)->notEmpty(). These are apparently intended to mean x.oclIsKindOf(T), i.e. a Boolean-valued test that x has the type T or a subtype.

    The fact that the ->notEmpty() happens to pass the syntax checking is an unfortunate and misleading “feature” of OCL. Semantically, all of these expressions in their current form will evaluate to true, whatever their arguments.

    I found these constraints all to have the problem:

    all_lifelines

    interaction_uses_share_lifeline

    selector_int_or_string

    sending_receiving_message_event

    signature_is_signal

    signature_is_operation_request

    signature_is_operation_reply

  • Reported: UML 2.5b1 — Wed, 20 Feb 2013 05:00 GMT
  • Disposition: Resolved — UML 2.5
  • Disposition Summary:

    Change the OCL productions to replace:
    x.oclIsKindOf(T)->notEmpty()
    by:
    x.oclIsKindOf(T)

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