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

Variable Index

 o d
Corresponding desktop (screen image) of the machine
 o FSA
Machine types supported by this software
 o type
Type of this machine

Constructor Index

 o Machine(Desktop)
Creates machine corresponding to its desktop image.
 o Machine(Machine)

Method Index

 o checkMachine()
Checks if machine is valid (i.e.
 o existsFinalState()
Returns true if the machine has at least one final state
 o findReachables()
returns a Vector of all unreachable States in this machine
 o getAlphabet()
returns a Vector of Charatcters containing the alphabet.
 o showNondets()
Checks for nondeterministic states and highlights them.
 o showUnreachables()
Shows all unreachable states in this machine

Variables

 o FSA
 public static final int FSA
Machine types supported by this software

 o type
 public int type
Type of this machine

 o d
 public Desktop d
Corresponding desktop (screen image) of the machine

Constructors

 o Machine
 public Machine(Desktop d)
Creates machine corresponding to its desktop image.

 o Machine
 public Machine(Machine source)

Methods

 o 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).
 o existsFinalState
 public boolean existsFinalState()
Returns true if the machine has at least one final state

 o showNondets
 public boolean showNondets()
Checks for nondeterministic states and highlights them.

Returns:
true if machine HAS nondeterministic states
 o showUnreachables
 public String showUnreachables()
Shows all unreachable states in this machine

 o findReachables
 public Vector findReachables()
returns a Vector of all unreachable States in this machine

 o 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