All Packages Class Hierarchy This Package Previous Next Index
Class javaParse.Machine
java.lang.Object
|
+----javaParse.Machine
- public abstract class Machine
- extends Object
This class implements the concept of a machine
in the sense used in the automata theory.
It is abstract since its running behavior is not defined.
It is used as a wrapper for the different types of
machines: FSA, PDA, TM1, TM2.
Any subclass of this class has to override at least
the following (non-public) methods:
expand(Configuration)
initialConfig()
isDeterministic(Transition, Vector)
- See Also:
- FSA, PDA, TM1, TM2
-
d
- Corresponding desktop (screen image) of the machine
-
FSA
-
Machine types supported by this software
-
type
- Type of this machine
-
Machine(Desktop)
- Creates machine corresponding to its desktop image.
-
Machine(Machine)
-
-
checkMachine()
- Checks if machine is valid (i.e.
-
existsFinalState()
- Returns true if the machine has at least one final state
-
findReachables()
- returns a Vector of all unreachable States in this machine
-
getAlphabet()
- returns a Vector of Charatcters containing the alphabet.
-
showNondets()
- Checks for nondeterministic states and highlights them.
-
showUnreachables()
- Shows all unreachable states in this machine
FSA
public static final int FSA
- Machine types supported by this software
type
public int type
- Type of this machine
d
public Desktop d
- Corresponding desktop (screen image) of the machine
Machine
public Machine(Desktop d)
- Creates machine corresponding to its desktop image.
Machine
public Machine(Machine source)
checkMachine
public String checkMachine()
- Checks if machine is valid (i.e. has initial state).
Will be rewritten in TM1 and TM2, to also check if transition
labels are valid.
- Returns:
- Message string (null if machine is OK).
existsFinalState
public boolean existsFinalState()
- Returns true if the machine has at least one final state
showNondets
public boolean showNondets()
- Checks for nondeterministic states and highlights them.
- Returns:
- true if machine HAS nondeterministic states
showUnreachables
public String showUnreachables()
- Shows all unreachable states in this machine
findReachables
public Vector findReachables()
- returns a Vector of all unreachable States in this machine
getAlphabet
public Vector getAlphabet()
- returns a Vector of Charatcters containing the alphabet. Implement this in the subclass
if needed.
All Packages Class Hierarchy This Package Previous Next Index