com.irs.jam
Class Interpreter

java.lang.Object
  |
  +--com.irs.jam.Interpreter
All Implemented Interfaces:
java.io.Serializable

public class Interpreter
extends java.lang.Object
implements java.io.Serializable

The JAM agent's architectural core

See Also:
Serialized Form

Field Summary
protected  IntentionStructure _intentionStructure
           
protected  Plan _observer
           
protected  PlanTable _planLibrary
           
protected  boolean _showActionFailure
           
protected  boolean _showAPL
           
protected  boolean _showGoalList
           
protected  boolean _showIntentionStructure
           
protected  boolean _showWorldModel
           
protected  Functions _systemFunctions
           
protected  Functions _userFunctions
           
protected  WorldModelTable _worldModel
           
 
Constructor Summary
Interpreter()
          Default constructor
Interpreter(java.lang.String[] argv)
           
 
Method Summary
 boolean getAgentHasMoved()
           
 IntentionStructure getIntentionStructure()
           
 int getNumAPLsStat()
           
 int getNumCyclesStat()
           
 int getNumGoalsStat()
           
 int getNumNullAPLsStat()
           
 Plan getObserver()
           
 PlanTable getPlanLibrary()
           
 SymbolTable getRelationTable()
           
 boolean getShowActionFailure()
           
 boolean getShowAPL()
           
 boolean getShowGoalList()
           
 boolean getShowIntentionStructure()
           
 boolean getShowWorldModel()
           
 Functions getSystemFunctions()
           
 double getTotalUtilityStat()
           
 Functions getUserFunctions()
           
 WorldModelTable getWorldModel()
           
protected  void myResume()
          Resume the currently executing thread safely.
protected  void myStop()
          Stop the currently executing thread safely.
protected  void mySuspend()
          Suspend the currently executing thread safely.
 void parse(java.lang.String[] argv)
          Parse the list of files for plans, goals, world model entries, and Observer specifications.
 void parseString(Interpreter interpreter, java.lang.String pString)
          Parse the string for plans, goals, world model entries, and Observer specifications.
 void setAgentHasMoved(boolean flag)
           
 void setIntentionStructure(IntentionStructure is)
           
 void setNumAPLsStat(int num)
           
 void setNumCyclesStat(int num)
           
 void setNumGoalsStat(int num)
           
 void setNumNullAPLsStat(int num)
           
 void setObserver(Plan p)
           
 void setPlanLibrary(PlanTable t)
           
 boolean setShowActionFailure(boolean flag)
           
 boolean setShowAPL(boolean flag)
           
 boolean setShowGoalList(boolean flag)
           
 boolean setShowIntentionStructure(boolean flag)
           
 boolean setShowWorldModel(boolean flag)
           
 void setSystemFunctions(Functions f)
           
 void setTotalUtilityStat(double num)
           
 void setUserFunctions(Functions f)
           
 void setWorldModel(WorldModelTable t)
           
protected  boolean stopped()
          Returns true if this thread has been stopped.
protected  boolean suspended()
          Returns true if this thread has been suspended.
 boolean think()
          Execute the agent's behavior
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_planLibrary

protected PlanTable _planLibrary

_worldModel

protected WorldModelTable _worldModel

_intentionStructure

protected IntentionStructure _intentionStructure

_observer

protected Plan _observer

_systemFunctions

protected Functions _systemFunctions

_userFunctions

protected Functions _userFunctions

_showWorldModel

protected boolean _showWorldModel

_showGoalList

protected boolean _showGoalList

_showIntentionStructure

protected boolean _showIntentionStructure

_showAPL

protected boolean _showAPL

_showActionFailure

protected boolean _showActionFailure
Constructor Detail

Interpreter

public Interpreter()
Default constructor

Interpreter

public Interpreter(java.lang.String[] argv)
            throws ParseException,
                   java.io.IOException
Method Detail

getPlanLibrary

public PlanTable getPlanLibrary()

setPlanLibrary

public void setPlanLibrary(PlanTable t)

getWorldModel

public WorldModelTable getWorldModel()

setWorldModel

public void setWorldModel(WorldModelTable t)

getIntentionStructure

public IntentionStructure getIntentionStructure()

setIntentionStructure

public void setIntentionStructure(IntentionStructure is)

getSystemFunctions

public Functions getSystemFunctions()

setSystemFunctions

public void setSystemFunctions(Functions f)

getUserFunctions

public Functions getUserFunctions()

setUserFunctions

public void setUserFunctions(Functions f)

getObserver

public Plan getObserver()

setObserver

public void setObserver(Plan p)

getRelationTable

public SymbolTable getRelationTable()

getNumAPLsStat

public int getNumAPLsStat()

setNumAPLsStat

public void setNumAPLsStat(int num)

getNumNullAPLsStat

public int getNumNullAPLsStat()

setNumNullAPLsStat

public void setNumNullAPLsStat(int num)

getNumGoalsStat

public int getNumGoalsStat()

setNumGoalsStat

public void setNumGoalsStat(int num)

getNumCyclesStat

public int getNumCyclesStat()

setNumCyclesStat

public void setNumCyclesStat(int num)

getTotalUtilityStat

public double getTotalUtilityStat()

setTotalUtilityStat

public void setTotalUtilityStat(double num)

getAgentHasMoved

public boolean getAgentHasMoved()

setAgentHasMoved

public void setAgentHasMoved(boolean flag)

getShowWorldModel

public boolean getShowWorldModel()

getShowGoalList

public boolean getShowGoalList()

getShowAPL

public boolean getShowAPL()

getShowIntentionStructure

public boolean getShowIntentionStructure()

getShowActionFailure

public boolean getShowActionFailure()

setShowWorldModel

public boolean setShowWorldModel(boolean flag)

setShowGoalList

public boolean setShowGoalList(boolean flag)

setShowAPL

public boolean setShowAPL(boolean flag)

setShowIntentionStructure

public boolean setShowIntentionStructure(boolean flag)

setShowActionFailure

public boolean setShowActionFailure(boolean flag)

mySuspend

protected void mySuspend()
Suspend the currently executing thread safely.

suspended

protected boolean suspended()
Returns true if this thread has been suspended.
See Also:
mySuspend()

myResume

protected void myResume()
Resume the currently executing thread safely.

myStop

protected void myStop()
Stop the currently executing thread safely.

stopped

protected boolean stopped()
Returns true if this thread has been stopped.
See Also:
myStop()

parse

public void parse(java.lang.String[] argv)
           throws java.io.IOException,
                  ParseException
Parse the list of files for plans, goals, world model entries, and Observer specifications.

think

public boolean think()
Execute the agent's behavior

parseString

public void parseString(Interpreter interpreter,
                        java.lang.String pString)
Parse the string for plans, goals, world model entries, and Observer specifications.