# Parallel Programming: State Diagram Example

• Enter into state S0 into the superstate S1 through event 1 and yields action a1.
• When entering into superstate S1, we must go through state S12, with action a7 to enter and action a3 to exit.
• If action a3 yields an event e9, which yielded action a9, we enter into state S13, causing action a6 and action a12 to exit.
• If action a12 yields an event e5, we will get action a5 and we hit the superstate S1 and begin again to state S2.
• If action a12 yields an event e9, we will use action a1 an enter state S112 (under the S11 superstate) with an entry of an action a11.
• Event e2 acts on S112, to get action 2 which enters the superstate S11.
• Entering into the superstate through state S112 we get an exit criterion of action a14 and we end.
• If exiting state S112 we do event e1 and action a1 we are sent back to state S12 to start again.
• If we exit state S112 we do event e3 and action a3 which is used to enter into state S1 follow 1.a.
• If action a3 in state S12 yields event e4 and action a4, we enter the superstate S11. Entering super state S11 this way we enter into state S111 with an entry action of a8.
• We then carry out event e9 and action a1 to get to state S112. If this happens follow 1.a.i.2.
Advertisement