feature-crossing-specialization

Available in: KerML, SysML

This checks that end features with owned cross features have no explicit crossings.

This is specified as checkFeatureCrossingSpecialization constraint in the specification. However, it is impossible to ensure automatically and thus is explicitly validated.

Specification

If this Feature has is_end = true and owned_cross_feature returns a non-null value, then the cross_feature of the Feature must be the Feature returned from owned_cross_feature (which implies that this Feature has an appropriate owned_cross_subsetting to realize this).

Example

attribute def A;
attribute def B {
    end [1] attribute b : A { c : A; }
    end [1] attribute c : A => b.c; // error
}

Instead, remove the explicit crossing leaving only the implicit one:

attribute def A;
attribute def B {
    end [1] attribute b : A { c : A; }
    end [1] attribute c : A; // ok
}