ABLE, Version 1.1b

com.ibm.able.beans.rules
Class AbleInferenceEngine

java.lang.Object
  |
  +--com.ibm.able.beans.rules.AbleInferenceEngine

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

The InferenceEngine provides the control code and inferencing algorithms for processing a RuleSet (consisting of working memory and rules) It manages a set of sensors/effectors which may be

Version:
1.0.0; change log:
 Version   Description
 --------  -----------
 1.0.0     Initial release.

 
See Also:
Serialized Form

Field Summary
protected  AbleRuleSet rs
          rb is the current ruleset.
 java.util.Vector ruleList
          ruleList is a list of all rules in the rulebase.
 java.util.Hashtable variableList
          variableList is a list of all variables in the rulebase.
 
Constructor Summary
AbleInferenceEngine()
          Create a new inference engine.
 
Method Summary
 void backwardChain(java.lang.String goalVariableName)
          Given a goal variable, apply inverse moves and work toward the intial state: For all consequent clauses which refer to this goal variable, try to find a goal variable value via a rule being true.
 void forwardChain()
          Work forward from an initial state to the goal state.
 AbleRuleSet getRuleSet()
          Retrieve the current rulebase.
 java.util.Vector match(boolean test)
          Determine which rules can fire and return a Vector of them to the forward chainer.
 void resetRuleSet()
          Reset the ruleset for another round of inferencing by setting all variable values to null and clearing the 'fired' flag of all rules.
 AbleRule selectRule(java.util.Vector aRuleSet)
          Select a rule to fire based on specificity, and return it to the forward chainer.
 void setRuleSet(AbleRuleSet aRuleSet)
          Set the current rulebase.
protected  void trace(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rs

protected AbleRuleSet rs
rb is the current ruleset.

ruleList

public java.util.Vector ruleList
ruleList is a list of all rules in the rulebase.

variableList

public java.util.Hashtable variableList
variableList is a list of all variables in the rulebase.
Constructor Detail

AbleInferenceEngine

public AbleInferenceEngine()
Create a new inference engine.
Method Detail

setRuleSet

public void setRuleSet(AbleRuleSet aRuleSet)
Set the current rulebase.
Parameters:
aRuleSet - A ruleset that replaces the current ruleset, if there is one.

Returns:
void.

getRuleSet

public AbleRuleSet getRuleSet()
Retrieve the current rulebase.
Returns:
The current rulebase object.

resetRuleSet

public void resetRuleSet()
                  throws java.rmi.RemoteException
Reset the ruleset for another round of inferencing by setting all variable values to null and clearing the 'fired' flag of all rules.
Returns:
void.

backwardChain

public void backwardChain(java.lang.String goalVariableName)
Given a goal variable, apply inverse moves and work toward the intial state: For all consequent clauses which refer to this goal variable, try to find a goal variable value via a rule being true. If a rule is true then pop, assign value, re-eval rule If a rule is false then pop, continue If a rule is null then we couldn't find a value (same as false?)
Parameters:
goalVariableName - The name of a variable on the variable list.

Returns:
void.

forwardChain

public void forwardChain()
Work forward from an initial state to the goal state.
Returns:
void.

match

public java.util.Vector match(boolean test)
Determine which rules can fire and return a Vector of them to the forward chainer.
Parameters:
test - Specifies whether each rule's antecedents should be tested before the rule's truth value is examined.

Returns:
A list of rules eligible to be fired.

selectRule

public AbleRule selectRule(java.util.Vector aRuleSet)
Select a rule to fire based on specificity, and return it to the forward chainer.
Parameters:
aRuleSet - A set of rules determined by match().

Returns:
The best rule of the conflict set to fire next.

trace

protected void trace(java.lang.String s)

ABLE, Version 1.1b

ABLE: Produced by Joe, Don, and Jeff who say, 'Thanks for your support.'