80 likes | 202 Views
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
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.