-
Key: KERML11-72
-
Status: open
-
Source: Model Driven Solutions ( Mr. Ed Seidewitz)
-
Summary:
As document in 8.3.3.1.10 Type for the operation removedRedefinedFeatures, an otherwise inheritable Membership is removed from the inheritedMemberships of a Type if either of the following conditions holds:
- The memberElement of the Membership is included in redefined Features of another Membership in [the inheritable] memberships.
- One of the redefined Features of the Membership is a directly redefinedFeature of an ownedFeature of this Type.
But consider applying this rule to the following model:
classifier A { feature x; } classifier B :> A { feature :>> A::x; } classifier C :> A, B { feature :>> A::x; } classifier D :> B, C;
Clearly, in classifiers B and C, the feature A::X is not inherited, because it is directly redefined by an owned feature of the classifier. Moreover, in classifier C, B::x is also not inherited, because B::x redefines A::x, and A::x is directly redefined by an owned feature of C. In classifier D however, both B::x and C::x are inherited. This is because C::x does not actually have a redefinition relationship with B::x, so the first condition of the removeRedefinedFeatures rule does not apply. As a result, D will inherit two redefinitions of x, which is semantically inconsistent and will violate the constraint validateNamespaceDistinguishibility.
This seems in itself potentially anomalous for user expectations. However, there is a more concerning impact when implied specializations are involved. For example, suppose the specialization by C of A and the specialization by D of B are both implied relationships. Since C also specializes B, and B is a supertype of A, according to 8.4.2 Semantic Constraints and Implied Relationships, the implied specialization of A can be considered redundant and not included – and similarly for the implied specialization by D of B. But it is only permitted, not required, that redundant implied relationships be removed. This means that, if a tool removes the implied specializations of A and B, then D is valid, but, if it does not remove them, then D is invalid, which is problematic.
-
Reported: KerML 1.0b2 — Tue, 8 Jul 2025 22:14 GMT
-
Updated: Wed, 9 Jul 2025 02:55 GMT
KERML11 — Redefinition inheritance anomaly
- Key: KERML11-72
- OMG Task Force: Kernel Modeling Language (KerML) 1.1 RTF