expression-return-parameter-membership
Available in: KerML, SysML
This checks that expressions have at most one return parameter.
Note: this matches the Pilot implementation for
validateExpressionResultParameterMembership constraint and only checks owned
memberships.
Specification
An
Expressionmust have exactly onefeature_membership(owned or inherited) that is aResultParameterMembership.
(Yes, looks like a typo in the specification.)
Example
calc c {
return attribute = 4;
return attribute = 4; // error
}
Remove the additional return parameters:
calc c {
return attribute = 4; // ok
}