-
Key: UML23-131
-
Legacy Issue Number: 14554
-
Status: closed
-
Source: The MathWorks ( Mr. Salman Qadri)
-
Summary:
In UML 2.3 and earlier, Interface-redefinedInterface subsets RedefinableElement-redefinedElement. However, since Interface specializes Classifier, the property should subset Classifier-redefinedClassifier instead, which will in turn subset RedefinableElement-redefinedElement
-
Reported: UML 2.2 — Mon, 12 Oct 2009 04:00 GMT
-
Disposition: Resolved — UML 2.3
-
Disposition Summary:
It is legal for Interface::redefinedInterface to have a subset relation with Classifier::redefinedClassifier, even if the latter is not a derived union. Such a relation simply means that, even though there are two distinct associations, any redefinedInterface must also be a redefinedClassifier but that there may be redefinedClassifiers (of an interface) that are not redefinedInterfaces.
Of course, if it is desired that an interface only be able to redefine another interface, then the simplest thing to do would be to just add a constraint to Interface that all redefinedClassifiers must be interfaces. Actually, the proper way to do this is to redefined the OCL operation RedefinableElement::isConsistentWith.
On the other hand, if we make redefinedClassifier a derived union, then we also need to add non-derived subsetting associations to all the subclasses of Classifier, not just Interface. And this would result in a definite semantics change. For example, right now a class can, seemingly, realize any classifier.
RedefinableElement::isConsistentWith is false by default, and needs to be “must be overridden for subclasses of RedefinableElement to define the consistency conditions”. Class and Interface would therefore need to override isConsistentWith in order to define the meaning of redefinition of specific kinds of classifiers. Redefinition of classifiers was introduced in order to allow behaviors, which are Classifiers, to redefine other behaviors.
This is possibly a bigger problem. The model for redefinable elements sets up a relatively simple but quite flexible mechanism for establishing the consistency of the redefinition of various kinds of elements. But this simply has not been used properly in the specification of most kinds of redefinable elements. However, section 7.3.24 does have a simpler error, redefinedInterface cannot subset Element::redefinedElement since it doesn?t exist. See figure 7.9 and figure 7.16. Rather than address the meaning of interface redefinition in this resolution, the error should be corrected so that at least the redefineInterface contributes to a valid subset as suggested in the issue. -
Updated: Fri, 6 Mar 2015 20:58 GMT
UML23 — Interface-redefinedInterface should subset Classifier-redefinedClassifier
- Key: UML23-131
- OMG Task Force: UML 2.3 RTF