feature-cross-feature-specialization
Available in: KerML, SysML
This checks that cross features specialize cross features of the redefined features of the crossing features.
Specification
If this
Featurehas across_feature, then, for anyFeaturethat is redefined by thisFeature, thecross_featuremust specialize thecross_featureof the redefinedendFeature, if this exists.
Example
attribute def C;
a {
end [1] attribute b : C;
end [1] attribute c : C;
}
b :> a {
end [1] attribute b { attribute c : C; }
end attribute c : C => b.c; // error
}
Because cross subsettings must chain exactly two features, it is impossible to satisfy all the constraints by using explicit cross subsettings. Instead, use owned cross features that will create implicit cross subsettings:
attribute def C;
a {
end [1] attribute b : C;
end [1] attribute c : C;
}
b :> a {
end [1] attribute b { attribute c : C; }
end [1] attribute c : C; // ok
}