class-specialization

Available in: KerML, SysML

This checks that classes do not specialize data types, and non-association classes additionally do not specialize associations.

Specification

A Class must not specialize a DataType and it can only specialize an Association if it is also itself a kind of Association (such as an AssociationStructure or Interaction).

Example

Class specializing a DataType is an error:

attribute def A;
part def P :> A; // error

So is Class that is not an Association specializing an Association:

flow def F { end a; end b; }
part def P :> F; // error

Instead, prefer specializing other classes:

part def A;
part def P :> A; // ok

Or specialize associations by other associations:

flow def F { end a; end b; }
flow def P :> F; // ok