Community
Participate
Working Groups
Steps to reproduce : 1. Create a stereotype ste1 extending UML::Element with a property prop1 2. Create a stereotype ste2 as a generalization of ste1. -> the API and the UML editors allow to apply ste1 and ste2 in the same time on a given element. This behavior must be forbidden, because ste2 is a ste1 and UML doesn't allow to apply several time the same stereotype on a given object. Moreover, the properties owned by ste1 also exist in ste2, so we get the propertier twice, with the same semantic and potentially with inconsistant values.
Thanks for the bug report, contributions are most welcome.
I think you need to find the UML 2.5 specification text that prohibits this. I think it is very legal. Specifically whether a stereotype can be applied multiple times is a user modeling choice controlled by the extension multiplicity. Even with a unit multiplicity, it is not forbidden since the user may choose to apply ste1 or ste2 or nothing. There is no problem at compile time since that only involves references. At run-time it is arguable that the multiple inheritances are merged, so that there is only one slot. Alternatively they could be distinct requiring disambiguation by the derived class name. Perhaps both designs are valid as in C++ where "virtual" chooses between the two policies. Perhaps in UML it is an implementation choice for which there could be a UML2Ecore GenOption. => INVALID IMHO
After discussing withe the team. The norm do not forbid the application of two stererotypes that inherits from the other.