feature-value-overriding

Available in: KerML, SysML

This checks that redefined features have either no feature values, or default feature values if the redefining feature itself has feature value.

Specification

All Features directly or indirectly redefined by the feature_with_value of a FeatureValue must have only default FeatureValues.

Example

attribute def A {
    attribute a = 5;
}
attribute def B :> A {
    attribute a :>> a = 6; // error
}

Instead, use default feature value on the redefined feature:

attribute def A {
    attribute a default 5;
}
attribute def B :> A {
    attribute a :>> a = 6; // ok
}

Or remove feature value from the redefining feature:

attribute def A {
    attribute a = 5;
}
attribute def B :> A {
    attribute a :>> a; // ok
}