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
Classmust not specialize aDataTypeand it can only specialize anAssociationif it is also itself a kind ofAssociation(such as anAssociationStructureorInteraction).
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