KerML 1.0b2 FTF Avatar
  1. OMG Issue

KERML — validateClassSpecialization is too strict

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

    The documentation for the constraint validateClassSpecializtion states:

    A Class must not specialize a DataType and it can only specialize an Association if it is an AssociationStructure.

    with the OCL

    ownedSpecialization.general->
        forAll(not oclIsKindOf(DataType)) and
    not oclIsKindOf(AssociationStructure) implies
        ownedSpecialization.general->
            forAll(not oclIsKindOf(Association))
    

    However, an Interaction is both a Behavior, which is a kind of Class, and an Association, and, for example, the library interaction Transfer specializes both Performance (a behavior) and BinaryLink (an association). But the above constraint disallows this specialization.

    The validateClassSpecialization constraint needs to be updated to allow both AssociationStructures and Interactions to specialize Associations.

  • Reported: KerML 1.0b1 — Wed, 12 Jul 2023 20:29 GMT
  • Disposition: Resolved — KerML 1.0b2
  • Disposition Summary:

    Revise OCL for validateClassSpecification

    The requested loosening of the validateClassSpecialization constraint can be best achieved by simply changing the check in the OCL for not oclIsKindOf(AssociationStructure) to not oclIsKindOf(Association). This will permit both AssociationStructures and Interactions (both of which are kinds of Class and kinds of Association) to specialize Associations, as desired. However, while currently AssociationStructures and Interactions are the only two kinds of Class that are also Associations, the proposed updated OCL would also allow for the possibility of a future extension to the abstract syntax adding another such metaclass, without having to further update this OCL.

  • Updated: Tue, 1 Jul 2025 15:00 GMT