constraint-usage-types

Available in: SysML

This checks that constraint usages are only typed by a constraint case definition.

Subsumes occurrence-usage-types.

Specification

While not formally described in chapter 8, it is given in chapter 7.13.2:

A constraint usage must be defined by a single constraint definition or a KerML predicate.

Example

part def P;
constraint def C1;
constraint def C2;
constraint c : P; // error: A constraint usage must be defined by a single constraint definition or a KerML predicate
constraint r : C1, C2; // error: A constraint usage must be defined by a single constraint definition or a KerML predicate

Fix this by removing specializations that directly or indirectly contribute to invalid types:

part def P;
constraint c; // ok

or specialize only a single case definition:

constraint def C1;
constraint c : C1; // ok

All validation rules