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, 20051 The Design Language of Statecharts

2 Vered Gafni, 20052 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, 20053 Transition Events Syntax

4 Vered Gafni, 20054 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, 20055 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 { "@context": "", "@type": "ImageObject", "contentUrl": "", "name": "Vered Gafni, 20055 Conditions A, B,....", "description": "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, 20056 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, 20057 Example of Compound Transition

8 Vered Gafni, 20058 Transition Connectors

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

10 Vered Gafni, 200510 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, 200511 Example of Sequential Refinement Equivalence up to priorities

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

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

14 Vered Gafni, 200514 Automatic Cruise Control

15 Vered Gafni, 200515 Operating

16 Vered Gafni, 200516

17 Vered Gafni, 200517

18 Vered Gafni, 200518 Railroad Crossing Control

19 Vered Gafni, 200519 Crossing Control: Sequential Design

20 Vered Gafni, 200520 Crossing Control: Parallel Design

21 Vered Gafni, 200521 Using Timeout Delay Periodic activation deadline

22 Vered Gafni, 200522 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, 200523 Timeout for Periodic Activation Execute control loop at 10Hz rate RTC /tick tm(tick,100mls)/tick WaitTick Control Loop tick done

24 Vered Gafni, 200524 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, 200525 Synchronization Techniques I

26 Vered Gafni, 200526 Synchronization Techniques II

27 Vered Gafni, 200527 Synchronization Techniques III

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

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

31 Vered Gafni, 200531 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, 200532

33 Vered Gafni, 200533

34 Vered Gafni, 200534

35 Vered Gafni, 200535

36 Vered Gafni, 200536

37 Vered Gafni, 200537

38 Vered Gafni, 200538

39 Vered Gafni, 200539

40 Vered Gafni, 200540

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

Similar presentations

Ads by Google