programs and state machines program fsm connection
play

Programs and State Machines Program & FSM connection What is - PowerPoint PPT Presentation

Programs and State Machines Program & FSM connection What is the connection between programs and finite state machines? P&SM2 Program & FSM connection 2 What is the connection between programs and finite state


  1. Programs and State Machines

  2. Program & FSM connection  What is the connection between programs and finite state machines? P&SM–2

  3. Program & FSM connection – 2  What is the connection between programs and finite state machines?  The program control graph and its corresponding FSM are duals of each other  Not standard graph definition of a dual  Nodes become edges and vice-versa P&SM–3

  4. Program & FSM connection – 3 Corresponding FSM Program Control In FSM actions Graph are on the edges P&SM–4

  5. Communicating state machines  State machines can influence each other  A transition's action may cause an event in another machine  A transition's guard may query the state of another  machne P&SM–5

  6. Communication example Control performs operations Display shows status Control Display P&SM–6

  7. Communication example – 3  In each machine, considered independently, there are no unreachable states  In Control can go from state A to state D and back again  When considered together, the previous path is impossible  Cannot go from state B to state D unless Display is in the Off state  Control cannot be in state B unless Display is in the On state.  Collectively machines can have unreachable states P&SM–7

  8. Students & payment example Fence diagram time time P&SM–8

Recommend


More recommend