SlideServe
Menu
Préférences
© SlideServe · v2026

Automata Based Programming

Thomas avatar
14 diapositives · 488 Views · Dec 26, 2011

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.

Automata Based Programming - slide 1
01 / 14Automata Based Programming
1 / 17

Télécharger la présentation

Automata Based Programming
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  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/