/automata_iOS_0

Automaton Prototype iOS App

Primary LanguageSwift

automata_iOS_0

automata application and algorithms for iOS devices

Run Program

  1. Clone Repository
  2. Open Project (In "Automata_Work5" directory) in XCode
  3. Run Simulator

Overview

App contains two View Controllers:

  • ATVC: AutomatonTableViewController (starting View Controller on Launch)
  • AVC: AutomatonViewController

AutomatonViewController (AVC)

alt tag alt tag alt tag

  • 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 will cause it to be selected. Next Point tap
  • 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 (then SFM ends)
  • Set Label Mode (SLM): Tap Transition (tap its label or control points), the first character of the text field will be the new label of the transition.

Automaton buttons:

  • State: Begins ASM
  • Transition: Begins ASM
  • Final: Begins SFM
  • Control Points: Toggles on/off automaton showing its control points
  • Set Label: Begins SLM (If and only if Text Field above is empty)

Function buttons (Creates New Automaton):

Test Automaton

alt tag

Test Automaton: Deterministic

alt tag

Test Automaton: Pruned

alt tag

Test Automaton: Minimisation (Clustered)

alt tag

Moving Automaton: Tap State

alt tag

Moving Automaton: Tap New State Location

alt tag

Moving Automaton: Tap Transition

alt tag

Moving Automaton: Tap New Transition Location (w/ respect to Label)

alt tag

Test Automaton: Minimisation (Clean)

alt tag

AutomatonTableViewController (ATVC):

(Starting View Controller when app launches)

  • Each cell stores information of an Automaton
  • The title of each Automaton is "Automaton (count)", where (count) is the order in which Automaton was created. (eg "Automaton 8") (Note: count starts at 0)

ATVC has 3 modes:

  • Normal Mode: Can create and edit Automaton
  • Union Mode: When 2 cells are selected, respective Automatons taken. Union function preformed on respective Automatons, then AVC created with new Automaton
  • Intersect Mode: When 2 cells are selected, respective Automatons taken. Intersect function performed on respective Automatons, then AVC created with new Automaton

One can perform 4 actions on ATVC

  • Edit Automaton (Tap Cell): Automaton taken from cell. AVC created with said Automaton.
    (Note: only in normal mode)
  • New Automaton (Tap “+” button): Brand new empty Automaton is created. AVC is created with new Automaton.
  • Begin Union (Tap “Union” button): Begins Intersect Mode (see Mode section above)
  • Begin Intersect (Tap “Intersect” button): Begins Union Mode (see Mode section above)
Sample Table

alt tag

Automaton 0

alt tag

Automaton 1

alt tag

Union Automaton (Automaton 0 ∪ Automaton 1)

alt tag

Intersect Automaton (Automaton 0 ∩ Automaton 1)

alt tag

Updated Table

alt tag