80 likes | 209 Views
This guide covers the essential aspects of defining, creating, and visualizing Finite State Machines (FSMs). Learn how to define Finite State Automata (FSAs) and Finite State Transducers (FSTs) in text files and utilize commands like `fsmcompile`, `fsmprint`, and `fsmdraw` for effective automation file handling. Explore different types of labels, their usage, and how to compile FSMs for various formats. Additionally, discover how to visualize FSMs through both text and graphical outputs, including formats such as JPEG, GIF, and PostScript.
E N D
FSM Library Defining, Creating and Visualizing FSMs
Defining FSAs • Define FSA in a text file • Useful commands • fsmcompile • fsmprint • fsmdraw automaton file
Defining FSTs • Define FST in a text file • Useful commands • fsmcompile • fsmprint • fsmdraw transducer file
Labels • Three Types • input labels • output labels • state labels
Using Labels • You can use symbolic labels instead of numbers • Need to associate labels with numbers labels file automaton file
Compiling FSMs • Use fsmcompile • FSAs fsmcompile < defn.file > fsa.file • FSTs fsmcompile –t < defn.file > fst.file • FSMs with Labels fsmcompile [-t] –i input.labels [-o output.labels] [-s state.labels] < defn.file > fsm.file
Visualizing FSMs • Text Output • Use fsmprint fsmprint {label.files} < machine.fsm • Graphical Output • Use fsmdraw • Output in PostScript, JPEG, GIF, etc fsmdraw < machine.fsm | dot –Tformat > output.x • Format: jpg, ps, gif, etc.