Skip to main content
Version: 5.x

MULTI operator

The MULTI operator creates an action that implements branching (polymorphic form).


MULTI [exclusionType] action1, ..., actionN 


The MULTI operator creates an action that executes one of the actions passed to it depending on whether the selection conditions are met. The property selection condition is that the parameters match this action signature.


  • exclusionType

    Type of mutual exclusion. Determines whether several conditions for the action selection can be met simultaneously with a certain set of parameters. It is specified by one of the keywords:


    The EXCLUSIVE type indicates that the conditions for the action selection cannot be met simultaneously. The OVERRIDE type allows several conditions to be met simultaneously, in which case the first action in the list which selection condition is met will be selected.

    The EXCLUSIVE type is used by default.

  • action1, ..., actionN

    A list of context dependent action operators which define the actions from which the selection is made.


CLASS Shape;

CLASS Square : Shape;
CLASS Circle : Shape;

message (Square s) { MESSAGE 'Square'; }
message (Circle c) { MESSAGE 'Circle'; }

message (Shape s) = MULTI message[Square](s), message[Circle](s);