-
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.
-
The current state machine analysis data structure sma.
-
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 state machine hierarchy.
-
If t is an internal transition, then return t.
-
Otherwise
-
Let A be the actions of t, and let soj2 be the target of t.
-
If soj1 is a state definition sd or is a junction defined in a state definition sd, then let L2 be the list of state definitions in the state hierarchy in sma from the top level to sd, including sd, highest first. Otherwise let L1 be the empty list.
-
If soj2 is a state definition or a junction defined in a state definition sd, then let L2 be the list of state definitions in the state hierarchy in sma from the top level to sd, including sd, highest first. Otherwise let L2 be the empty list.
-
For each i in [1,2], let L'i be Li with the longest common prefix of L1 and L2 deleted.
-
Let L''1 be the reverse of L'1. Let A1 be the concatenation of the exit action lists of the elements of L''1.
-
Let A2 be the concatenation of the entry action lists of the elements of L'2.
-
Return the external transition whose actions are the concatenation of A1, A, and A2, and whose target is soj2.
-