metadata-feature-body

Available in: KerML, SysML

This checks that feature directly or indirectly owned by metadata have no declared names, redefine a single inherited feature, and have no values or model-level evaluable values.

Specification

Each owned_feature of a MetadataFeature must have no declared name, redefine a single Feature, either have no feature_value or a feature_value with a value Expression that is model-level evaluable, and only have owned_features that also meet these restrictions.

Example

metadata def M { attribute a; attribute b;}

// multiple redefinitions
@M {
    :>> a :>> b; // error
}

// non-model-level evaluable value
calc def C { 4 }
@M {
    :>> a = C(); // error
}

// package-level features
attribute x;
@M {
    :>> x; // error
}