language-lawyeruml

UML Features and Classifiers


In the UML specification for 2.5.1, the description of Feature is given in section 9.9.6 on page 180:

A Feature declares a behavioral or structural characteristic of Classifiers.

Further down, in section 9.9.6.6 "Association Ends", we have the specification of featuringClassifer:

/featuringClassifier : Classifier [0..1]

{union, subsets A_member_memberNamespace::memberNamespace} (opposite Classifier::feature)

The Classifiers that have this Feature as a feature.

To me, the multiplicity given ([0..1]) is problematic -- I cannot find any derivation of Feature whose owner can be anything but a Classifier, and each Element which is not a Package must have exactly one owner Element according to the descriptions given in section 7 under "Commom Structure".

Another thing (probably just a typo, but could lead to trouble) is the last sentence: "The Classifiers that have this Feature as a feature". Note that it says (plural) "classifiers" and not singular "classifier".

In earlier sections of the specification (section 6.1) it is remarked that some multiplicities were relaxed from having lowerBound == 1 to lowerBound == 0:

A small number of lower multiplicities have been relaxed from 1 to 0, in order to represent default values that cannot be formally represented using MOF. In these cases the absence of a value signifies the presence of a default value. These cases could not be represented at all in earlier versions of UML. They all occur in Clause 15: Activities and are made explicit in the text there.

However, Feature is not in Clause 15.

To me, a Feature must be owned by some kind of Classifier, either a Class, an Association, or an AssociationClass. Can anyone come up with a different scenario where a Feature (which is an abstract base class for Attributes, Operations, etc.) would be owned by something other than a Classifier? And if not, why can't featuringClassifier simply subset its owner Element?


Solution

  • Actually, there is a possible other owner for a Feature: A Property can be owned by another Property as its qualifier.

    Removing the plural of "classifers" has been missed by Issue UML22-382.

    Metamodel for Property