function-result-expression-membership

Available in: KerML, SysML

This checks that functions have at most one owned or inherited result expression membership.

Specification

An Function must have at most one ResultExpressionMembership.

Example

calc def a { 4 }
calc def b :> a { 5 } // error

Instead, prefer using composition which also makes intended behaviour far clearer without the inheritance semantics:

calc def a { 4 }
calc def b { a() } // ok