FSA
Class NFA

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

public class NFA
extends FA

This class represents a Nondeterministic Finite Automaton.

See Also:
Serialized Form

Constructor Summary
NFA(FSA.StateSet S, int s0, char[] Sigma, FSA.StateSet F, FSA.NFA_Table table)
          Constructs a NFA with specified states, start state, alphabet, accepting states, and nondeterministic transition table.
 
Method Summary
 FSA.StateSet getAcceptingStates()
          Returns the accepting states of this NFA.
 int getInitialState()
          Returns the initial state of this NFA.
 FSA.StateSet getStates()
          Returns the states of this NFA.
 char[] getSymbols()
          Returns the input alphabet symbols of this NFA.
 FSA.StateSet move(int s)
          Returns the set of states reachable from state s on epsilon transitions.
 FSA.StateSet move(int s, char a)
          Returns the set of states reachable from state s on symbol a.
 FSA.StateSet move(FSA.StateSet T, char a)
          Returns the set of states reachable from states in T on symbol a.
 java.lang.String toString()
          Returns a string representation of this NFA.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NFA

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

Method Detail

getInitialState

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


getStates

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


getAcceptingStates

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


getSymbols

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


move

public FSA.StateSet move(int s,
                         char a)
Returns the set of states reachable from state s on symbol a.


move

public FSA.StateSet move(FSA.StateSet T,
                         char a)
Returns the set of states reachable from states in T on symbol a.


move

public FSA.StateSet move(int s)
Returns the set of states reachable from state s on epsilon transitions.


toString

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