|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.able.rules.AbleInferenceEngine | +--com.ibm.able.examples.rules.PluggableEngine
This class extends the AbleInferenceEngine class so that it can be used as a customized pluggable inference engine. It can be used in any AbleRuleSet by specifying " using com.ibm.able.examples.rules.PluggableEngine" on the ruleblock definition.
Fields inherited from class com.ibm.able.rules.AbleInferenceEngine |
---|
myDebugLevel, myRuleBlock, myRuleSet, myRulesFiredCount, myTracer, myWorkingMemory |
Constructor Summary | |
---|---|
PluggableEngine(AbleRuleSet theRuleSet,
AbleLogger theTracer,
AbleRuleBlock theRuleBlock)
Create a new inference engine. |
Method Summary | |
---|---|
static java.lang.String |
Copyright()
Determine the copyright of this class. |
java.lang.Object |
getControlParameter(java.lang.String theControlParameter)
Get the specified control parameter on this inference engine. |
void |
infer(AbleRuleBlock theRuleBlock)
Fire the rules in the ruleset in sequential order. |
boolean |
isRuleBlockValid(AbleRuleBlock theRuleBlock)
Make sure the current ruleblock is "executable" by this inference engine. |
void |
reevaluateClausesWithChangedVariable(AbleClauseReferences theClauseReferences)
Re-evaluate, if necessary, the specified clauses that contain a reference to a variable whose current value has just changed. |
void |
setControlParameter(java.lang.String theControlParameter,
java.lang.Object theValue)
Set the specified control parameter on this inference engine. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PluggableEngine(AbleRuleSet theRuleSet, AbleLogger theTracer, AbleRuleBlock theRuleBlock)
theRuleSet
- A ruleset whose context is used for inferencing
by this inference engine.
theTracer
- A tracer object to which this inference engine can log
information. This may be null, in which case no
information is logged.
theRuleBlock
- A ruleblock whose rules are to be used for inferencing
by this inference engine.
Method Detail |
public boolean isRuleBlockValid(AbleRuleBlock theRuleBlock)
Here is the place where the custom engine examines the rules the user coded in this ruleblock to see if they are acceptable for processing by this engine. In this example, we simply say whatever they pass is ok for us since we are going to ignore all but assertions anyway.
isRuleBlockValid
in class AbleInferenceEngine
public void infer(AbleRuleBlock theRuleBlock) throws AbleDataException
The order of processing is as follows:
infer
in class AbleInferenceEngine
theRuleBlock
- The ruleblock used by this inference engine.
AbleDataException
- When any error occurs.public void reevaluateClausesWithChangedVariable(AbleClauseReferences theClauseReferences) throws AbleDataException
theClauseReferences
- A collection of clauses that reference some variable
whose current value has just changed.
public void setControlParameter(java.lang.String theControlParameter, java.lang.Object theValue) throws AbleDataException
setControlParameter
in class AbleInferenceEngine
public java.lang.Object getControlParameter(java.lang.String theControlParameter) throws AbleDataException
getControlParameter
in class AbleInferenceEngine
public static java.lang.String Copyright()
|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |