It is allowed that subtypes override ModellingRules on their InstanceDeclarations. As a general rule for subtyping, constraints shall only be tightened, not loosened. Therefore, it is not allowed to specify on the supertype that an instance shall exist with the ModellingRule Mandatory and on the subtype make this ModellingRule Optional. Table 20 specifies the allowed changes on the Properties when overriding the ModellingRules in the subtype.
Table 20 – Rule for ModellingRules Properties when Subtyping
ModellingRule on supertype |
ModellingRule on subtype |
Mandatory |
Mandatory |
Optional |
Mandatory or Optional |
MandatoryPlaceholder |
MandatoryPlaceholder |
OptionalPlaceholder |
MandatoryPlaceholder or OptionalPlaceholder |