Presentation is loading. Please wait.

Presentation is loading. Please wait.

State charts in SysML. Announcements 15 July 2004 – I-Logix announce that BAe systems are standardising on Statemate for development of Eurofighter TyphoonI-Logix.

Similar presentations


Presentation on theme: "State charts in SysML. Announcements 15 July 2004 – I-Logix announce that BAe systems are standardising on Statemate for development of Eurofighter TyphoonI-Logix."— Presentation transcript:

1 State charts in SysML

2 Announcements 15 July 2004 – I-Logix announce that BAe systems are standardising on Statemate for development of Eurofighter TyphoonI-Logix - using MDD – Model-driven Development Dec 14 2004 Statemate chosen for use by MBDA in the development of METEOR

3 Model–driven Development Design behaviour using diagrammatic notations Demonstrate and evaluate the behaviour early in the development process Generate the delivered code/part directly from the model, perhaps guided by the designer with additional decisions.

4 Statemate A state machine design tool based on David Harel’s state charts (incorporated into UML) Allows –Simulation – what would happen if the following sequence of events occurred. –Analysis – prove that the system can never lock up –Code generation – to C for loading into embedded processors

5 Basic State Machine The basic concepts in this notation are: –state A mode of the object/component/sub-system –transition A change of state caused by an event or input, perhaps back to the same state –event the input which causes a transition to occur –action An action which occurs when a transition is made

6

7 Exercise 1.1. What sequence of noises does it make when the sequence ABACAC is in put? 1.2 What about BABAAC? 1.3 What kind of error in the machine does the sequence ACCBA reveal? 1.4 What kind error in the machine does the input BABC reveal? 1.5 What kind of error does the sequence ABAXAC reveal? 1.6 Give other examples of good and bad input.

8 State tables States ↓ Inputs →ABC initial1234 2132 32 - - final4 - - -

9 JavaScript Simulator Web Simulator

10 Another Simulator This simulator takes a text file (written in an XML vocabulary) and builds a model which can be executed or visualized. Local CEMS FSM simulatorCEMS FSM simulator Web Simulator

11 Noise machine model print "boing" print "clack" print "clang" print "hiss" print "bang" print "pong" print "ping"

12 Physical devices Mechanical devices can be modelled with FSMs too

13 Exercise 3 A vending machine can accept 5, 10 and 20p coins up to a total value of 30p. There is one dispense button. When pressed, the machine issues a cold drink can and pockets the 30p. Define a suitable state machine. Note that the amount entered so far must be described only in the state of the machine, not in a separate counter.

14 Harel Statecharts guardspre-conditions on transitions nested statesone state may be composed of many substates. The superstate defines common behaviour such as transitions which are the same for all sub-states. entry and exit actionswhich occur on state entry and exit. activityon-going activities in a state event signallingcausing an internal event to be sent to another object concurrent statesparallel states in which state changes occur independently synchronisation and splitting to define the flow of control within parallel states timeouttransition triggered by a timeout counter set on state entry

15 Chinese clock Operating for clock Time display:- The normal display of Hour Minute and Month day are alternate move. Time setting:- 1) push S1 once, display shows MONTH, push S2 to advance month 2) push S1 twice, display shows DAY of MONTH, push S2 to advance DAY 3) push S1 third, display shows hour and AM/PM indicator. Push S2 to advance hour 4) push S1 fourth time, display shows MINUTES. Push S2 to advance MINUTES 5) push S1 fifth time, display shows normal running mode 6) push S1 One more time, display will alternate TIME and DATE each 2 seconds


Download ppt "State charts in SysML. Announcements 15 July 2004 – I-Logix announce that BAe systems are standardising on Statemate for development of Eurofighter TyphoonI-Logix."

Similar presentations


Ads by Google