KerML 1.0b3 FTF Avatar
  1. OMG Issue

KERML_ — Add validateSubsettingTypeConformance constraint

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

    There is currently no constraint that the typing of a subsetting feature conform to the typing of the subsetted feature. For example, the following is currently considered valid:

    classifier A;
    classifier B;
    
    feature x : A;
    feature y : B subsets x;
    

    even if there is no specialization relationship between A and B. Currently, what happens is that y picks up the additions the additional type A due to the subsetting. So the above declaration for y is essentially equivalent to

    feature y: B, A subsets x;
    

    Now, unless A and B are declared as disjoint, it is possible that there are instances classified by both A and B, so that this joint typing of y isn't vacuous. Nevertheless, it seems more useful, for static type checking, to presume disjointness and to disallow the above subsetting unless B can be statically determined to specialize A.

    This is relevant, in particular, for connectors, in which the related features are determined using reference subsetting. Consider the following:

    assoc C {
       end a: A;
       end b: B;
    }
    
    feature a1: A;
    feature b1: B;
    
    connector c: C from a ::> b1 to b ::> a1;
    

    Because of the above, this is currently allowed. But, as a result, this really seems to make the typing of association ends pretty much useless for connectors.

  • Reported: KerML 1.0b1 — Tue, 1 Aug 2023 15:32 GMT
  • Updated: Tue, 9 Apr 2024 23:30 GMT