KerML 1.0b4 FTF Avatar
  1. OMG Issue

KERML_ — Restrict the functionality of recursive import

  • Key: KERML_-75
  • Status: closed  
  • Source: Model Driven Solutions ( Mr. Ed Seidewitz)
  • Summary:

    The functionality of recursive importing is specified in the Namespace::visibleMemberships operation. If the isRecursive parameter of this operation is true, then the operation calls itself recursively on each Namespace that is a visible member (or any member, if isIncludeAll also is true) of the Namespace the operation was called on originally. This includes not only owned namespaces, but also those that are imported.

    Further, the visibleMemberships operation is redefined in Type to also include the visible inheritedMemberships of the Type. This nominally includes memberships inherited via implied Specializations as well as explicitly Specializations. This means that a recursive import will also potentially include a large number of names of standard library elements from Types in the recursive import graph, which is likely not what is intended by the modeler.

    So, as currently specified, recursive import unavoidably degrades the performance of any name resolution implementation, while including unintended functionality. To improve this, the following restrictions are recommended on the functionality of recursive import:

    1. Require recursive imports to be private.
    2. Only recurse on owned Namespaces.
    3. Do not included Memberships that are inherited via implied Specializations.
  • Reported: KerML 1.0b2 — Mon, 6 May 2024 04:20 GMT
  • Disposition: Resolved — KerML 1.0b4
  • Disposition Summary:

    Limit the recursion in recursive imports

    It is agreed that it is sensible to limit the recursion for a recursive import to only owned Namespaces and to not include inherited Memberships from implicit Specializations. However, this resolution does not require that recursive imports be private. One of the uses of a filtered recursive import is to construct an effective "element groups" from elements selected by "flattening" the namespace hierarchy of some portion of a model, which requires that the filtered import be public. Further, if the resolution to KERML_-73 is adopted, making imports private by default, then this will reduce the risk that a modeler accidentally makes a recursive import public when this is not intended.

  • Updated: Sat, 19 Jul 2025 18:58 GMT