Presentation is loading. Please wait.

Presentation is loading. Please wait.

Vered Gafni, 20051 The Design Language of Statecharts.

Similar presentations

Presentation on theme: "Vered Gafni, 20051 The Design Language of Statecharts."— Presentation transcript:

1 Vered Gafni, The Design Language of Statecharts

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

3 Vered Gafni, Transition Events Syntax

4 Vered Gafni, 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

5 Vered Gafni, 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

6 Vered Gafni, 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

7 Vered Gafni, Example of Compound Transition

8 Vered Gafni, Transition Connectors

9 Vered Gafni, L H valv e Water-level sensor Controller Valve command

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

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

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

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

14 Vered Gafni, Automatic Cruise Control

15 Vered Gafni, Operating

16 Vered Gafni,

17 Vered Gafni,

18 Vered Gafni, Railroad Crossing Control

19 Vered Gafni, Crossing Control: Sequential Design

20 Vered Gafni, Crossing Control: Parallel Design

21 Vered Gafni, Using Timeout Delay Periodic activation deadline

22 Vered Gafni, Timeout as Delay To activate the furnace open the oil valve, and after 3 seconds operate ignition Idle Ignition_ delay Furnace _Active Activate/Open_oil_valve tm(Activate,3sec)/Ignite

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

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

25 Vered Gafni, Synchronization Techniques I

26 Vered Gafni, Synchronization Techniques II

27 Vered Gafni, Synchronization Techniques III

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

29 Vered Gafni, 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

30 Vered Gafni,

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

32 Vered Gafni,

33 Vered Gafni,

34 Vered Gafni,

35 Vered Gafni,

36 Vered Gafni,

37 Vered Gafni,

38 Vered Gafni,

39 Vered Gafni,

40 Vered Gafni,

Download ppt "Vered Gafni, 20051 The Design Language of Statecharts."

Similar presentations

Ads by Google