-
Notifications
You must be signed in to change notification settings - Fork 34
Constructing Flattened Transitions
This algorithm constructs a flattened transition to a state or junction.
-
A state or junction soj1 representing the source of the transition in the hierarchical state machine.
-
A transition t.
-
A transition that records all actions specified in the source model together with all entry and exit actions implied by the hierarchical structure.
-
If t is an internal transition, then return t.
-
Otherwise
-
If soj1 is a state definition, then let sd1 be that state definition. Otherwise let sd1 be the state definition where soj1 is defined.
-
Let sd2 be the state definition where soj2 is defined.
-
Compute the definition d which is the lowest common ancestor of sd1 and sd2 in the AST. This is either a state definition or a state machine definition.
-
Let L' be the list of state definitions in the state hierarchy connecting sd1 to d, not including d, lowest first. Let A' be the concatenation of the exit action lists of the elements of L'.
-
Let L'' be the list of state definitions in the state hierarchy connecting d to sd2, not including d, highest first. Let A'' be the concatenation of the entry action lists of the elements of L''.
-
Return the external transition whose actions are the concatenation of A', A, and A'', and whose destination is soj2.
-