Open Source Project on Visual Finite-State Transducers. Programmed Primarily in Swift and C++.
Using the OpenFST Library to use their transducers (specifically “StdVectorFst” and “StdArc”)
- Clone Repository
- Open Project (In "xcode0" directory) in XCode
- Run Simulator
App contains 4 View Controllers:
- ATVC: AutomatonTableViewController (starting View Controller on Launch)
- AVC: AutomatonViewController (Main Automaton Functions)
- STPVC: SetTransitionPopViewController
- SFPVC: SetFinalPopViewController
- Contains a View, where the Automaton is visually represented. View should be blank when a new Automaton is created (b/c the automaton has no state nor transition)
View Contains 4 modes
- Normal Mode: Tapping on a State/Transition will cause it to be selected. Next tap will move the corresponding object to the tapped point.
- Note: For transitions, one can move the Label position or either Control Point Positions
- Add State Mode (ASM): Tap point on view, and circular state appears (then ASM ends)
- Note: If the state is the first in the Automaton, it is an initial state; hence small arrow points to it
- Add Transition Mode (ATM): Tap location of 2 states, and transition from first tapped state to second tapped state is formed (then ATM ends)
- Set Final Mode (SFM): Tap State, then state is a final state with the weight (then SFM ends)
Automaton buttons:
- State: Begins ASM
- Transition: Brings up a STPVC (after Transition variables set, ATM begins)
- Final: Brings up a SFPVC (after final weight set, SFM begins)
- Control Points: Toggles on/off automaton showing its control points
- Minimize: Creates Minimized version of the Automaton using the OpenFST library (http://www.openfst.org/twiki/bin/view/FST/MinimizeDoc)
- Beautify: Optimizes distances between the Automaton's states, so that Automaton is legible
(Popped after tapping on the “Transition” Button in AVC)
- Type in a Number on the text field, and then tap the “Input”/“Output”/“Weight” button to assign the field’s value to the corresponding variable
(Popped after tapping on the “Final” Button in AVC)
- Type in a Number on the text field to set a final Weight
(Starting View Controller when app launches)
- Each cell stores information of an Automaton, which contains an OpenFST “StdVectorFst”
- The title of each Automaton is "Automaton (count): (s_count) States, (t_count) Transitions“, where (count) is the order in which Automaton was created, (s_count) is the number of states in the automaton, and (t_count) is the number of transitions. (eg "Automaton 8: 4 States, 6 Transitions“)
- Note: (count) starts at 0
- When a cell is tapped an AVC will appear with a Automaton visualized
- Tap “+” button (Top Right Hand Corner) to create brand new empty Automaton in an AVC.