UML 2.5 FTF Avatar
  1. OMG Issue

UML25 — Keywords are inconsistently defined and applied

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

    The word “keyword” is used inconsistently throughout the spec. It is defined in Annex C, which clearly says that keywords are always enclosed in guillemets, and lists the keywords that appear in the spec. Non-stereotype keyword are currently all defined starting with lower case, while standard stereotypes (also listed in Annex C and counting as keywords) use upper case.

    However:

    1. Several keywords defined in the spec are missing from Annex C: bind, collaboration, complete, disjoint, parallel, iterative, stream and flow.

    2. Several references in the spec to standard stereotypes use lower case and should use upper: derive, refine, trace

    3. In 7.7.5 instantiate is described and lower-cased as a keyword when it should be referred to as a standard stereotype in upper case

    4. 9.2.4 states that the standard notation for classifiers “shows the metaclass in guillemets”. This is not true: almost all classifiers define a lower-case keyword for their notation, such as interface; sometimes the keyword is different from the metaclass name, e.g. primitive.

    5. Notwithstanding the above, the notations for Collaboration, Class and StateMachine explicitly and inconsistently use the metaclass name with uppercase. In the case of Collaboration (11.7.4) and Class (11.4.4), Annex C is missing the keyword; in the case of StateMachine, Annex C shows it as statemachine.

    6. Some words are described as keywords when they are not. Clause 13: all, at, after, when; clause 14: via, protocol; clause 17: sd, self, out, strict

    7. Annex C itself uses the phrase ‘the keyword “trace”’ when it should surely say ‘the keyword «Trace»’.

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

    There are many problems with keywords in Annex C and throughout the spec.
    (1) can be resolved by including appropriate definitions in Annex C.
    (2) can be resolved by correcting the references where they occur.
    For (3) a separate issue will be raised against clause 7.
    (4) can be resolved by altering 9.2.4 to refer to the keyword rather than the metaclass.
    (5) can be resolved by correcting the references to refer to the lower case name. (6) can be resolved by either rewriting to avoid the need for any terminology, or by using other terminology:
    “textual annotation” when the word is in curly brackets. Note that the BNF convention is to specify terminal
    symbols using single quotes; we should do the same in the specification text.
    (7) can be resolved as suggested.
    There are several words listed in the table in Annex C that are not keywords. Especially, compartment
    headers are not keywords (as they do not appear in guillemets) and should be removed from the table. This
    is a change from earlier versions of UML which were unclear and inconsistent about compartment naming.
    The notation placement “between braces” is contradictory with “Keywords are always enclosed in guillemets”.
    There are several related issues that can be merged with this one: 18113 is covered by 2. 18114 points out
    that «create»is a keyword as well as a standard stereotype. In fact «create»is not introduced anywhere in
    the spec as a keyword, and its definition as given in Annex C does not make sense because it cannot be
    represented in the abstract syntax. So the keyword can be deleted from the table. 11683 is rendered obsolete
    by the fact that

    {abstract}

    is correctly no longer described as a keyword.
    9125 is resolved by the points above.
    15756 is resolved by (1).
    15419 is resolved in the same way as 18114.
    Note also that issue 18112 removes all standard stereotypes from Annex C, so they are no longer defined as
    keywords.
    The resolution also corrects miscellaneous errors in Table C.1.

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