|
JTP API Documentation | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.beans.beancontext.BeanContextChildSupport | +--jtp.util.PropertyImporter | +--jtp.context.IterativeDeepening
An asking control reasoner that ensures that an iterative deepening search method is used to prove queries.
The maximum depth to which a search for a proof will be performed
can be set with setMaxDepth(int)
. In an iterative deepening
search approach, a bounded depth-first search is conducted at
a depth of 1, then 2, then 3, and so on up to the maximum
depth.
The query passed to process(java.lang.Object)
is subsequently passed to
the TheoremProver
for processing.
The Theorem Prover actually constructs a proof tree (but the
depth of the proof tree is determined by the IterativeDeepning
instance). It is the
entry point to the Asking Control
Dispatcher
, and thus to all the
general-purpose and domain-specific asking Reasoner
s in
the system.
Field Summary |
Fields inherited from class java.beans.beancontext.BeanContextChildSupport |
beanContext, beanContextChildPeer, pcSupport, rejectedSetBCOnce, vcSupport |
Constructor Summary | |
IterativeDeepening()
|
Method Summary | |
boolean |
acceptable(Object o)
All goals are acceptable to this reasoner. |
int |
getMaxDepth()
Returns the maximum depth to which a search for a proof of a query will be performed. |
int |
getStartingDepth()
Returns the depth of the initial bounded depth-first search for a proof to a query. |
Reasoner |
getTheoremProver()
Returns the Theorem Prover. |
Tracer |
getTracer()
|
boolean |
getTrimDeepSolutions()
When true, proofs that have a proof tree with a depth greater than the depth of the current bounded depth-first search are discarded. |
boolean |
getTrimShallowSolutions()
When true, proofs that have a proof tree with a depth less than the depth of the current bounded depth-first search are discarded. |
ReasoningStepIterator |
process(Object goal)
This method attempts to find proof for the goal. |
void |
setMaxDepth(int v)
Sets the maximum depth to which a search for a proof of a query will be performed. |
void |
setStartingDepth(int v)
Sets the depth of the initial bounded depth-first search for a proof to a query. |
void |
setTheoremProver(Reasoner v)
Sets the Theorem Prover which actually constructs proofs of queries and provides access to the AskingControlDispatcher and all of the child asking Reasoners of the system. |
void |
setTracer(Tracer v)
|
void |
setTrimDeepSolutions(boolean v)
Sets a flag determining whether or not to discard deep solutions. |
void |
setTrimShallowSolutions(boolean v)
Sets a flag determining whether or not to discard shallow solutions. |
Methods inherited from class jtp.util.PropertyImporter |
getImportedProperties, initializeBeanContextResources, setImportedProperties |
Methods inherited from class java.beans.beancontext.BeanContextChildSupport |
addPropertyChangeListener, addVetoableChangeListener, firePropertyChange, fireVetoableChange, getBeanContext, getBeanContextChildPeer, isDelegated, releaseBeanContextResources, removePropertyChangeListener, removeVetoableChangeListener, serviceAvailable, serviceRevoked, setBeanContext, validatePendingSetBeanContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public IterativeDeepening()
Method Detail |
public Tracer getTracer()
public void setTracer(Tracer v)
public Reasoner getTheoremProver()
setTheoremProver(jtp.Reasoner)
public void setTheoremProver(Reasoner v)
ModelEliminationReasoner
.
v
- an asking Reasoner to be used as the Theorem Proverpublic int getMaxDepth()
public void setMaxDepth(int v)
v
- maximum depth to which inferencing occurspublic int getStartingDepth()
public void setStartingDepth(int v)
v
- initial depth of searchpublic boolean getTrimShallowSolutions()
public void setTrimShallowSolutions(boolean v)
v
- true if shallow solutions are to be discarded; false otherwisegetTrimShallowSolutions()
public boolean getTrimDeepSolutions()
public void setTrimDeepSolutions(boolean v)
v
- true if deep solutions are to be discarded; false otherwisegetTrimDeepSolutions()
public ReasoningStepIterator process(Object goal) throws ReasoningException
Reasoner
Example. A reasoner that performs unification of the goal with facts in a
knowledge base can return the following enumeration for the goal (parent joe ?x)
:
(parent joe fred)
with variable assignment
?x=fred,(parent joe mary)
with variable assignment
?x=mary.
process
in interface Reasoner
goal
- the goal: either a query or an assertion
ReasoningException
public boolean acceptable(Object o)
acceptable
in interface Reasoner
|
JTP API Documentation | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |