Finite State Machine Code Generation - PowerPoint PPT Presentation

1 / 13
About This Presentation
Title:

Finite State Machine Code Generation

Description:

Thermostat.java. EventHandling.java. State Machine. Transitions. States. Source state ... Results for Running Thermostat.java. testdriver.java. Conclusion ... – PowerPoint PPT presentation

Number of Views:111
Avg rating:3.0/5.0
Slides: 14
Provided by: ani46
Category:

less

Transcript and Presenter's Notes

Title: Finite State Machine Code Generation


1
Finite State Machine Code Generation
2
Goal
  • Generating java code from finite state machine
    specification
  • by using dynamic script language called POET to
    improve the
  • performance.
  • Final code generation can be performed for each
    language of
  • interest by defining code template.
  • Here I have used code templates called
    JavaFront.code and
  • statemachine.code to generate java code from
    finite state machine
  • specification.

3
Algorithm
  • Translate Machine Algorithm
  • Input Finite State Machine Specification
  • Output Generated Java code
  • Input Specification
  • Controller State Machine
  • Thermostat State Machine
  • Output files
  • Controller.java
  • Thermostat.java
  • EventHandling.java

4
State Machine
  • Transitions
  • States
  • Source state
  • Destination State
  • Triggering Events
  • Conditions
  • Actions
  • Autonomous Transitions

5
Compiling the Program
6
Generating java code
  • Creating java class
  • Collect all the basic states

7
Translating Triggering Events
  • Collect all the events and create a member
    function for each event

8
Translating Actions
9
Results for Running Controller.java
  • testdriver.java

10
Multiple State Machines
  • Thermostat.java

11
Multiple State Machines
  • EventHandling.java

12
Results for Running Thermostat.java
  • testdriver.java

13
Conclusion
  • The generated java code from finite state machine
    specification is compiled and run successfully.
  • Going to extend this by generating code in C
    and by evaluating this work in future.
Write a Comment
User Comments (0)
About PowerShow.com