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
Featurehasis_end = trueandowned_cross_featurereturns a non-null value, then thecross_featureof theFeaturemust be theFeaturereturned fromowned_cross_feature(which implies that thisFeaturehas an appropriateowned_cross_subsettingto 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
}