1 / 40

The Design Language of Statecharts

The Design Language of Statecharts. Simple Statechart. Finite State Machine. R, S, T – States a, b, c, d - Events Arrows - State transitions (source-less arrow denotes an initial state). Transition Events. Syntax. Events. {a, b, c, .... } atomic events:

riley-moon
Download Presentation

The Design Language of Statecharts

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Design Language of Statecharts Vered Gafni, 2005

  2. Simple Statechart Finite State Machine R, S, T – States a, b, c, d - Events Arrows - State transitions (source-less arrow denotes an initial state). Vered Gafni, 2005

  3. Transition Events Syntax Vered Gafni, 2005

  4. Events {a, b, c, .... } atomic events: a or b a occurs or b occurs a and b a occurs and b occurs not(a) a does not occur tm(a,t) t time-units after the occurrence of a tr( C ) condition C becomes true fs( C ) condition C becomes false en(S) state S is entered ex(S) state S is exited Vered Gafni, 2005

  5. Conditions A, B,.... atomic conditions: A or B A is true or B is true A and B A is true and B is true not(A) A is false in(S) True while the system is in state S X=Y, X<Y,…. Boolean relations Vered Gafni, 2005

  6. Actions a,b,… atomic actions tr!(C) make condition C True fs!(C) make condition C False wr!(V) write variable V rd!(V) read variable V  atomic actions also considered event generation Vered Gafni, 2005

  7. Example of Compound Transition Vered Gafni, 2005

  8. Transition Connectors Vered Gafni, 2005

  9. Controller Valve command H Water-level sensor valve L Vered Gafni, 2005

  10. Sub-States: Sequential Refinement • S is a super-state w.r.t {S1, S2, S3 } • Super-state transitions (priority) • History entrance (H* -deep history) Vered Gafni, 2005

  11. Example of Sequential Refinement Equivalence up to priorities Vered Gafni, 2005

  12. Sub-states:Parallel Refinement Events broadcasting Vered Gafni, 2005

  13. דוגמא - בקר שיוט רכבAutomatic Cruise Control Vered Gafni, 2005

  14. Automatic Cruise Control Vered Gafni, 2005

  15. Operating Vered Gafni, 2005

  16. Vered Gafni, 2005

  17. Vered Gafni, 2005

  18. Railroad Crossing Control Vered Gafni, 2005

  19. Crossing Control: Sequential Design Vered Gafni, 2005

  20. Crossing Control: Parallel Design Vered Gafni, 2005

  21. Using Timeout • Delay • Periodic activation • deadline Vered Gafni, 2005

  22. Timeout as Delay • To activate the furnace open the oil valve, and after 3 seconds operate ignition Activate/Open_oil_valve Idle Ignition_delay tm(Activate,3sec)/Ignite Furnace_Active Vered Gafni, 2005

  23. Timeout for Periodic Activation • Execute control loop at 10Hz rate /tick WaitTick RTC tick Control Loop tm(tick,100mls)/tick done Vered Gafni, 2005

  24. Timeout as Deadline • Whenever train enters XR, gate should be closed within 10 seconds; otherwise an alarm will be activated Tin/CloseGate WaitTrain GateClosed Closing FailClosing tm(en(Closing),10sec)/Alarm Closed Vered Gafni, 2005

  25. Synchronization Techniques I Vered Gafni, 2005

  26. Synchronization Techniques II Vered Gafni, 2005

  27. Synchronization Techniques III Vered Gafni, 2005

  28. Transition Functions [K]  true[K] where ‘true’ is an event that occurs at every time instant Vered Gafni, 2005

  29. Magnum A Real-Time Design Tool • Provides for representation of 3 system views: • What: • - the activities the system should do, and inter-activities • data flow • When: • - the timing and synchronization of activities activation and • data transfer • Where: • - in what subsystem the each activity should be implemented Vered Gafni, 2005

  30. Vered Gafni, 2005

  31. A E3 A1 u f C h e A2 r A3 E1 E2 CC v w q s A2_1 A2_2 x Basic Components Vered Gafni, 2005

  32. Vered Gafni, 2005

  33. Vered Gafni, 2005

  34. Vered Gafni, 2005

  35. Vered Gafni, 2005

  36. Vered Gafni, 2005

  37. Vered Gafni, 2005

  38. Vered Gafni, 2005

  39. Vered Gafni, 2005

  40. Vered Gafni, 2005

More Related