-
Key: KERML11-12
-
Status: open
-
Source: Model Driven Solutions ( Mr. Ed Seidewitz)
-
Summary:
The OCL operation Namespace::importedMemberships computes the importedMemberships of a Namespace by calling the importMemberships operation on each of the ownedImports of the Namespace. This operation is redefined for Packages so that, if the Package has filterConditions, then any potentially imported Memberships are filtered out if it does not meet any of those conditions.
However, the Import::importMemberships operation, as specified for both MembershipImport (when recursive) and NamespaceImport uses the Namespace::visibleMemberships operation, not the importedMembership operation. The visibleMemberships operation in turn uses the Namespace::membershipsOfVisibility operation to collect both owned and imported Memberships of the proper visibility. But the membershipsOfVisibility operation is inherited by Package and not redefined.
As a result of this, when importing from a Package with filterConditions, the filterConditions are not applied when determining visible importedMemberships re-exported by the Package. In particular, a filtered import of the form "import Pkg::*[condition];" is parsed as an import of an anonymous package that owns the condition, but, with the current formal specification, the filtering will not actually be applied in this case.
-
Reported: KerML 1.0b2 — Thu, 1 May 2025 21:20 GMT
-
Updated: Fri, 20 Jun 2025 19:32 GMT
KERML11 — Filtering is not applied on imported packages
- Key: KERML11-12
- OMG Task Force: Kernel Modeling Language (KerML) 1.1 RTF