OCL 2.5 RTF Avatar
  1. OMG Issue

OCL25 — OCL: Usage of qualifiers

  • Key: OCL25-200
  • Legacy Issue Number: 3513
  • Status: open  
  • Source: OpenModeling ( Jos Warmer)
  • Summary:

    Qualifiers, written in brackets after the path name of a feature call,
    can express two different things.

    • qualifying use: A qualifier is used to give the qualifing value of
      a qualified association (chapter 7.5.7).
    • navigational use: A qualifier is used to refine the navigation to
      association classes. While this navigational use is necessary
      only with recursive associations, it is legal for every navigation
      to an association class (chapter 7.5.5).

    There is no way to distinguish these two sorts of qualifiers. There are
    even expressions where both uses of the qualifiers would be necessary at
    once, but this problem is restricted to such models that contain a
    recursive, qualified association that has an association class.

    Example where navigational and qualifing use cannot be distinguished:

    There are two classes "Bank" and "Person", with a association between
    them qualified by the account number (an Integer). The association end
    at the class Person is named "customers".
    An additional class "Company" has an attribute "customers" of type
    Integer.

    Now consider the subexpression "bank.person[customers]" in the context
    of Company. "bank" clearly is a navigational expression. But "customers"
    could either mean the attribute of Company, since Company is the context
    of the expression (that is qualifying use as defined in 7.5.7); or
    "customer" could mean the name of the association end (navigational use
    as defined in 7.5.5). In the first case, the result type would be
    Person, in the second case Set(Person).

  • Reported: OCL 2.0b1 — Wed, 29 Mar 2000 05:00 GMT
  • Updated: Thu, 8 Oct 2015 14:12 GMT