KerML 1.0b3 FTF Avatar
  1. OMG Issue

KERML_ — Type::directionOf does not handle inheritence from feature chains

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

    When a feature subsets a feature chain, the subsetting feature inherits features from the last feature in the subsetted feature chain. However, the OCL for the operation directionOf in 8.3.3.1.10 Type does not take this into account. It traverses upwards in the specialization and conjugation hierarchy without checking for feature chains.

    For example, consider the model

    behavior B {
        composite step s { in x; }
    }
    
    struct S {
        step b : B;
        feature f {
            feature c chains b.s;
            step s1 subsets c { out x1 redefines x; }
        }
    }
    

    In this model, the in parameter x is inheritable from b.s, so it can be redefined by x1 in step s1. However, according to the constraint validateRedefinitionDirectionConformance, one would expect that it would be an error to redefine x1 to be an out parameter, since x is an in parameter. But validateRedefinitionDirectionConformance uses the directionOf operation, which traverses the ownedSpecializations of feature c without considering its feature chaining. As a result, the directionOf parameter x relative to s1 is null rather than in, and the desired constraint does not apply.

  • Reported: KerML 1.0b2 — Wed, 22 May 2024 21:36 GMT
  • Updated: Wed, 22 May 2024 21:36 GMT