1 / 15

State charts in SysML

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

jeb
Download Presentation

State charts in SysML

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. State charts in SysML

  2. Announcements • 15 July 2004 – I-Logix announce that BAe systems are standardising on Statemate for development of Eurofighter Typhoon • - 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. 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.

  7. State tables

  8. JavaScript Simulator • Web Simulator

  9. 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 simulator • Web Simulator

  10. Noise machine model <stm name="Noise Machine"> <initialState id="1" /> <finalState id="4"/> <state id="1"/> <state id="2"/> <state id="3"/> <state id="4"/> <event id="A"/> <event id="B"/> <event id="C"/> <transition from="1" to="2" input="A"> <action> print "boing" </action> </transition> <transition from="1" to="3" input="B"> <action> print "clack" </action> </transition> <transition from="1" to="4" input="C"> <action> print "clang" </action> </transition> <transition from="2" to="1" input="A"> <action> print "hiss" </action> </transition> <transition from="2" to="3" input="B"> <action> print "bang" </action> </transition> <transition from="2" to="2" input="C"> <action> print "pong" </action> </transition> <transition from="3" to="2" input="A"> <action> print "ping" </action> </transition> </stm>

  11. Physical devices • Mechanical devices can be modelled with FSMs too

  12. 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.

  13. Harel Statecharts

  14. 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

More Related