1 / 14

Automata Based Programming

Automata Based Programming. Margarita Spit šakova Institute of Cybernetics at Tallinn University of Technology 19 . 03 . 08. Outline. Introduction Definition of FSM Usage of FSM FSM as programs Example Future work Conclusions Software, further reading. Introduction.

Thomas
Download Presentation

Automata Based Programming

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. Automata Based Programming Margarita Spitšakova Institute of Cybernetics at Tallinn University of Technology 19.03.08

  2. Outline • Introduction • Definition of FSM • Usage of FSM • FSM as programs • Example • Future work • Conclusions • Software, further reading

  3. Introduction • Master thesis: “Genetic Inference of Finite State Machines” • Finite state machine is something abstract • Why I need to generate FSMs?

  4. Finite State Machines • States, transitions, input and output alphabets, final state, initial state. • Moore machine (output at state) • Mealy machine (output at transition) • Deterministic machine

  5. Using FSM • FSM as hardware model • Text recognition (regular expressions) • Text transformations • Pushdown automata in parsers

  6. FSM as program Event Controlled object Controller = Finite State Machines Controlled object Event Controlled object Event

  7. Example. Traffic Lights Red Yellow Red + yellow Blinking green Green

  8. Model

  9. Source code. Controlled object publicclass TrafficLight implements ControlledObject { publicvoid red(StateMachineContext context) { System.out.println("Red"); } publicvoid green(StateMachineContext context) { System.out.println("Green"); } publicvoid yellow(StateMachineContext context) { System.out.println("Yellow"); } publicvoid greenblink(StateMachineContext context) { System.out.println("Green Blinking"); } publicvoid redyellow(StateMachineContext context) { System.out.println("red yellow"); } }

  10. FSM

  11. Source code. Controller switch (s) { casegreen: switch (event) { casenext tick: if (counter_x4 < 20) { make transition to state “blinking green”; returnnew StateMachineConfig("blinking green"); } if (counter_x4 >= 20) { make transition to final state; returnnew StateMachineConfig(" final state "); } … } Switch technology

  12. Conclusions • Modeling system • Modeling=writing the code • Step-by-step • Easier to verify • Good for modeling reactive systems

  13. Future work Event Controlled object Controller = Finite State Machine Controlled object Event Controlled object Event Can be generated

  14. Software. Further reading • Unimod. Eclipse plugin for designing object-oriented event-driven applications using automata-based programming adapted for UML. http://unimod.sourceforge.net • AutoFSM. http://autogen.sourceforge.net • Сайт по автоматному программированию http://is.ifmo.ru/

More Related