Werkzeuge für Erstellung und Visualisierung von Endlichen Automaten Referentinnen: Nataliya Kutsenko, Xenia Tschepuschtanov
Werkzeuge für Erstellung und Visualisierung
von Endlichen Automaten
Referentinnen:
Nataliya Kutsenko,
Xenia Tschepuschtanov
Finite State Atomata ToolsAT&T FSM Library™ [1]
AutoFSM [2]
AsmL [3]
Bandera [4]
Boost Statechart Library [5]
CAZE - FSM-based .NET authorization library [6]
Cellogica - State machine for gene expression [7]
Covered [8]
Concurrent Hierarchical State Machine [9]
DescoGUI [10]
Dynamic Attachment Finite State Machine (DAFSM) [11]
Exorciser [12]
Finite State Kernel Creator [13]
Finite State Machine Editor [14]
FSA Utilities [19]
Libero [20]
Java Finite Automata [21]
JFLAP [22]
jFAST [23]
jrexx-Lab [24]
JSpasm [25]
Kara [26]
MetaAuto [27]
Nunni FSM Generator [28]
Petrify [29]
PyFSA [30]
Qfsm [31]
Quantum-Leaps [32]
Ragel [33]
RWTH FSA Toolkit [34]
SCXML (State Chart
FIRE Engine, Station and Works [16]
FSMGenerator [17]
XML) [35]
SFST, the Stuttgart Finite State Transducer Tools [36]
Statestep [37]
StateWORKS [38]
State Machine Compiler [39]
Steed.net [40]
SMC - Finite State Machine Compiler (Java, C++) [41]
Supremica[42]
UniMod [43]
Visio2Switch [44]
visualSTATE [45]
WhatOS [46]
Xerox Finite-State Software Tools [47]
XTND (XML Transition Network Definition) [48]
Finite State Machine Explorer [15]
Grail+ [18]
AT&T FSM library TM
FSM C library stellt Tools zur Verfügung, um endliche Akzeptoren und Transducer:• zu erzeugen• zu kombinieren • zu optimieren • zu suchen (insgesamt um die 30 Funktionen)
Entwickelt für Unix, mittlerweile auch Windows Version
FSM File Typen
User Programm Level: Programme lesen aus und schreiben in Dateien und Pipelines
Text Format: • Acceptor Files• Transduser Files
Binary Format: ´Compilierte´ Repräsentation wird für alle FSM Utilities verwendet.
Acceptor Files
www.research.att.com/sw/tools/fsm
Transducer Files
www.research.att.com/sw/tools/fsm
Compiling, Printing, and Drawing FSMs
Compiling from textual represantation:fsmcompile <A.txt >A.fsa fsmcompile –t <T.txt >T.fst
Printing of binary represantation:fsmprint <A.fsa >A.txtfsmprint <T.fst >T.txt
Drawing of binary represantation:fsmdraw <A.fsa | dot –Tjpg >A.jpgfsmdraw <T.fst | dot –Tjpg >T.jpg
www.research.att.com/sw/tools/fsm
Funktionsumfang
Union:
Equation: C = A U B, C = A|B
Program: fsmunion A.fsa B.fsa >C.fsa
Concatanation: C = AB
Equation:
Program: fsmconcat A.fsa B.fsa >C.fsa
Closure:
Equation: C = A *
Program: fsmclosure A.fsa >C.fsa
www.research.att.com/sw/tools/fsm
Funktionsumfang
Determinization
Minimization
Epsilon Removal
… (zahlreiche Funktionen)
Fazit:
• Die Arbeit mit FSM Library erfolgt primär von der
Konsole aus.• Sehr großer Funktionsumfang• Graphische Funktion eines Automaten möglich• Keine Möglichkeit zur Umwandlung der RA in die EA
und umgekehrt
JFLAP:Java Format Language and Automata Package
Das Programm steht als ausführbare Anwendung zur Verfügung (Jar-Datei) und als eine Applet-Version
Funktionsumfang:
• Visualisierung, Simulation und Konstruktion
verschiedener Automatentypen:
- Endliche Automaten
- Kellerautomaten
- Turingmaschinen• Umwandlung regulärer Ausdrücke in endliche
Automaten und umgekehrt• Minimierung von endlicher Automaten • Kombinieren von endlichen Automaten
Fazit:
• Sehr großer Funktionsumfang • Einfache Handhabung, umfangreiche Dokumentation
mit Beispielen• Laden und Speichern von Automaten ist möglich• Quellcode ist verfügbar
FSA - Finite State Automaton processing in Python
Dieses Module definiert eine FSA Klassefür Repräsentation und Verwendung von endlichen Automaten
class FSA: def __init__(self, states, alphabet, transitions, initialState, finalStates): if states == None: states = self.collectStates(transitions, initialState, finalStates) else:
...
FSA & Python: FSA instance creation
fsa.tuple() returns these values in that order, i.e. (states, alphabet, transitions, initialState, finalStates).
Each element of transition is a tuple of a start state, an end state, and a label: (startState, endSTate, label).
FSA & Python: Methoden
fsa.accepts(sequence)
returns true or false
fsa.determinized()
returns an equivalent deterministic FSA
fsa.minimized()
returns an equivalent minimal FSA
FSA & Python: Funktionen
concatenation(fsa1, fsa2) returns an fsa that accepts sequences composed of a sequence accepted by a, followed by a sequence accepted by b
union(fsa1, fsa2) returns an fsa that accepts sequences accepted by both a and b
closure(fsa) returns an fsa that accepts sequences composed of zero or more concatenations of sequences accepted by the argument
equivalent(fsa1, fsa2) returns true if a and b accept the same language
FSA & Python: RE, Präsentation
compileRE(string)
returns an FSA that accepts the language described by string, where string is a list of symbols and '*', '+', and '|'
operators, with '(' and ')' to control precedence.
toDotString() returns a string suitable as *.dot file for the 'dot' program from AT&T GraphViz
FSM Simulator (Java)
– Simulation des Automaten
– Automat muss als „Code“ vorliegen
FSM Simulator (Java)
1. DFA //Type2. --- Beispiel-Automat --- //Title
3. a b c // input alphabet4. q0 q1 q2 // Machine states5. q0 // the initial state6. q2 // final states
7. q0 a q1 // transitions: input state, input symbol, output state8. q1 b q29. q2 c q2
10.end //required
http://www.cs.binghamton.edu/~software/fsm/fsmdoc.html
DescoGUI
• DescoGUI ist ein Automaten-Editor (Windows)• Graphisch die Automaten erstellen und bearbeiten• Automaten in verschiedene Formate exportieren
Unterstützte Formate:– AT&T DOT – LaTeX – Desco – XML based Formate
http://www.s2.chalmers.se/software/desco
Kara - Programmieren mit endlichen Automaten
• Das Leben eines Marienkäfers durch Automaten simulieren
• für Schüler/innen
• Einstieg in die Grundideen der Programmierung
• Endliche Automaten sind einfach zu verstehen
http://www.swisseduc.ch/informatik/karatojava/
Links:
• AT&T FSM library TM
www.research.att.com/sw/tools/fsm• JFLAP:Java Format Language and Automata Package
www.jflap.org• PyFSA - Finite State Automaton processing in Python
http://osteele.com/software/python/fsa/• FSM Simulator (Java)
http://www.cs.binghamton.edu/~software/fsm/fsmdoc.html• DescoGUI
http://www.s2.chalmers.se/software/desco/• Kara - Programmieren mit endlichen Automaten
http://www.swisseduc.ch/informatik/karatojava/