com.agentfactory.logic.reasoner
Class LRStackEntry

java.lang.Object
  extended by com.agentfactory.logic.reasoner.LRStackEntry

public class LRStackEntry
extends java.lang.Object

This class (Logic Reasoner Stack Entry) contains the contents of the active and completed stacks used by the resolution engine (LogicReasoner). An instance of this class represents a potential solution to a resolution query. If there are no goals left for this potential solution, then the solution must be valid for the query. If there are still goals, then there is more reasoning to be done.


Constructor Summary
LRStackEntry()
           
 
Method Summary
 void addGoal(java.lang.Object inGoal)
          Add a goal to the goal to the LRS stack entry.
 LRStackEntry copy()
           
 java.util.ArrayList getGoalStack()
           
 SubstitutionSet getSolution()
          Returns the solution that has been derived so far.
 void setCompleted(boolean c)
           
 void setGoalStack(java.util.ArrayList v)
           
 void setSolution(SubstitutionSet s)
           
 void update(java.util.ArrayList variables)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LRStackEntry

public LRStackEntry()
Method Detail

copy

public LRStackEntry copy()

setCompleted

public void setCompleted(boolean c)

getGoalStack

public java.util.ArrayList getGoalStack()

setGoalStack

public void setGoalStack(java.util.ArrayList v)

getSolution

public SubstitutionSet getSolution()
Returns the solution that has been derived so far. A solution is actually a substitution set.

Returns:
A substitution set (the partial (or full) suolution

setSolution

public void setSolution(SubstitutionSet s)

update

public void update(java.util.ArrayList variables)

addGoal

public void addGoal(java.lang.Object inGoal)
Add a goal to the goal to the LRS stack entry. If the input is a conjunction of goals, each goal is added to the stack. The goal is the thing that is being checked for entailment.

Parameters:
inGoal - - The goal which is to be added to the LRStackEntry. The object must be a FOS or a TerAND.