FSA
Class DFA

java.lang.Object
  |
  +--FA
        |
        +--FSA.DFA

public class DFA
extends FA

This class represents a Deterministic Finite Automaton.

See Also:
Serialized Form

Constructor Summary
DFA(FSA.StateSet S, int s0, char[] Sigma, FSA.StateSet F, FSA.DFA_Table table)
          Constructs a DFA with specified states, start state, alphabet, accepting states, and deterministic transition table.
 
Method Summary
 FSA.StateSet getAcceptingStates()
          Returns the accepting states of this DFA.
 int getInitialState()
          Returns the initial state of this DFA.
 FSA.StateSet getStates()
          Returns the states of this DFA.
 char[] getSymbols()
          Returns the input alphabet symbols of this DFA.
 FSA.DFA_Table getTransitionTable()
          Returns the transition table of this DFA.
 int move(int s, char a)
          Returns the state reachable from state s on symbol a, or -1 if no such state exists.
 java.lang.String toString()
          Returns a string representation of this DFA.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DFA

public DFA(FSA.StateSet S,
           int s0,
           char[] Sigma,
           FSA.StateSet F,
           FSA.DFA_Table table)
Constructs a DFA with specified states, start state, alphabet, accepting states, and deterministic transition table.

Method Detail

getStates

public FSA.StateSet getStates()
Returns the states of this DFA.


getAcceptingStates

public FSA.StateSet getAcceptingStates()
Returns the accepting states of this DFA.


getSymbols

public char[] getSymbols()
Returns the input alphabet symbols of this DFA.


getTransitionTable

public FSA.DFA_Table getTransitionTable()
Returns the transition table of this DFA.


move

public int move(int s,
                char a)
Returns the state reachable from state s on symbol a, or -1 if no such state exists.


getInitialState

public int getInitialState()
Returns the initial state of this DFA.


toString

public java.lang.String toString()
Returns a string representation of this DFA.