1 / 24

Creation of Automaton Classes from Graphical Models and Automatic Solution for Inverse Problem

Creation of Automaton Classes from Graphical Models and Automatic Solution for Inverse Problem. Yuri A. Gubin student of SPb SU ITMO supervised by Anatoly A. Shalyto Ph. D, prof. CTD, SPb SU ITMO. Outline. Automata- b ased p rogramming Reverse engineering DOT modeling language

ayanna
Download Presentation

Creation of Automaton Classes from Graphical Models and Automatic Solution for Inverse Problem

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. Creation of Automaton Classes from Graphical Models and Automatic Solution for Inverse Problem Yuri A. Gubin student of SPb SU ITMO supervised by Anatoly A. Shalyto Ph. D, prof. CTD, SPb SU ITMO

  2. Outline • Automata-based programming • Reverse engineering • DOT modeling language • Creation of automaton classes from graphical models • Library for creation of automaton classes • Description of the algorithm of automatic transfer from the executable code to isomorphic graphical model • How it works. Automaton for user registration.

  3. Automata-based programming overview • Introduced by A. Shalyto in 1991; • Sort of synchronous programming; • Programs are treated as systems of automated controlled objects; • Each system consists of control system and controlled objects; • Control system - system of co-operating automata.

  4. Automata-based programming benefits • Formally describes application logic and behaviour; • Perfect solution for reliable application development for reactive and embedded systems; • Defines two types of diagrams for application description – connectivity schema and transition graphs; • Partition usage

  5. Outline • Automata-based programming • Reverse engineering • DOT modeling language • Creation of automaton classes from graphical models • Library for creation of automaton classes • Description of the algorithm of automatic transfer of the executable code to isomorphic graphical model • How it works. Automaton for user registration.

  6. Reverse engineering Aspects of usage: • Repair lost documentation. • Product analysis. • Security auditing. • Academic/learning purposes. • Curiosity. • Competitive technical intelligence. • Learning: Learn from others mistakes Graphical model is an important part of reverse engineering process

  7. Outline • Automata-based programming • Reverse engineering • DOT modeling language • Creation of automaton classes from graphical models • Library for creation of automaton classes • Description of the algorithm of automatic transfer of the executable code to isomorphic graphical model • How it works. Automaton for user registration.

  8. Graphviz • Graphviz is a package of open source tools initiated by AT&T Research Labs for drawing graphs specified in DOT language scripts. • Graphviz is free software licensed under the Common Public License. • Graphviz consists of a graph description language named the DOT language and a set of tools

  9. DOT & dot • Modeling language • Directed/undirected graphs • Attributes • Tool • Cross platform • SVG, PNG, GIF, JPG digraph graphname { a -> b -> c; b -> d; }

  10. More about DOT • Behavior diagram. • Graphs. • Describe logic. • Concurrent processes • Entire structure • Reverse engineering of automata-based programs

  11. Outline • Automata-based programming • Reverse engineering • DOT modeling language • Creation of automata-based programs from graphical models • Library for creation of automaton classes • Description of the algorithm of automatic transfer of the executable code to isomorphic graphical model • How it works. Automaton for user registration.

  12. Creation of automata-based programs We can: • Use visual tools (Real, UniMod). • Use DSL (in Ruby, Groovy, others). • Use automaton libraries (Java, C#).

  13. Outline • Automata-based programming • Reverse engineering • DOT modeling language • Creation of automaton classes from graphical models • Library for creation of automaton classes • Description of the algorithm of automatic transfer of the executable code to isomorphic graphical model • How it works. Automaton for user registration.

  14. Overview • Classes: • Automaton components: State, Transition, StateGroup, DSL. • Other classes: Entity, DOTConverter*. • Interfaces: • Guard • Action

  15. Sample package demo; import automaton.*; public class PureStates extends DSL { public State a = new State("a"); public State b = new State("b"); public Transition t1 = new Transition("t1", "Event", new Guard() { public boolean is() { System.out.println("Stub guard"); return true;} public String toDOT() { return "Stub guard";} }, null,a, b); public Transition t2 = new Transition( "t2", "Event2",null, null, b, a); }

  16. Usage and Benefits import automaton.*; import demo.*; publicclass Main { public static void main(String[] args) { PureStates pureStates= new PureStates() ; DSL.compile(pureStates, pureStates.a); pureStates.saveToFile(“pure_states.dat"); pureStates.printImageToFile(“pure_states.gif"); pureStates.process("Event"); … • Benefits: • Anonymous classes • Inheritance of automaton classes • Syntactic attractiveness • Designed for isomorphic transformation to model

  17. Outline • Automata-based programming • Reverse engineering • DOT modeling language • Creation of automaton classes from graphical models • Library for creation of automaton classes • Description of the algorithm of automatic transfer of the executable code to isomorphic graphical model • How it works. Automaton for user registration.

  18. Overview Input data: • Meta information • Properties of automaton class and components • Description of each component in DOT Problems • Duplicated nodes • Transitions between states and groups • Transitions between groups • Nested groups, states

  19. Step by step states that don’t belongs to any group groups and nested states transitions • Objects are self-described • Object transforms itself to simple DOT

  20. Output saveToFile() – save as plain text printImageToFile() – save as Image digraph veryuniqname { compound=true; subgraph cluster0{ "c"[ label = "c"] "axstart"[shape=point] "axstart" -> "a" "a"[ label = "a"] "b"[ label = "b"] "b"->"c"[label = " E "] "c"->"a"[label = " E "] "a"->"b"[label = " E(G)/ACT "] "b"->"a"[label = " E "] label=" StatesInheritance : demo.PureStates "} }

  21. Outline • Automata-based programming • Reverse engineering • DOT modeling language • Creation of automaton classes from graphical models • Library for creation of automaton classes • Description of the algorithm of automatic transfer of the executable code to isomorphic graphical model • How it works. Automaton for user registration.

  22. BasicUser model

  23. AdvancedUser model

  24. Thank you!

More Related