Class ReteEngine

java.lang.Object
org.episteme.natural.computing.ai.expert.rete.ReteEngine
All Implemented Interfaces:
InferenceEngine

public class ReteEngine extends Object implements InferenceEngine
High-performance Rete engine implementation for expert systems.
  • Constructor Details

    • ReteEngine

      public ReteEngine()
  • Method Details

    • addRule

      public void addRule(Rule rule)
      Description copied from interface: InferenceEngine
      Adds a rule to the knowledge base.
      Specified by:
      addRule in interface InferenceEngine
      Parameters:
      rule - the rule to be added.
    • addFact

      public void addFact(Object fact)
      Description copied from interface: InferenceEngine
      Adds a fact (data object) to the working memory.
      Specified by:
      addFact in interface InferenceEngine
      Parameters:
      fact - the object to be reasoned about.
    • removeFact

      public void removeFact(Object fact)
      Description copied from interface: InferenceEngine
      Removes a fact from the working memory.
      Specified by:
      removeFact in interface InferenceEngine
      Parameters:
      fact - the object to remove.
    • fireRules

      public void fireRules()
      Description copied from interface: InferenceEngine
      Triggers the inference cycle. Automatically matches rules against facts and executes them.
      Specified by:
      fireRules in interface InferenceEngine
    • getFacts

      public Collection<Object> getFacts()
      Description copied from interface: InferenceEngine
      Retrieves all facts currently in the working memory.
      Specified by:
      getFacts in interface InferenceEngine
      Returns:
      a collection of facts.
    • clearFacts

      public void clearFacts()
      Description copied from interface: InferenceEngine
      clears the working memory.
      Specified by:
      clearFacts in interface InferenceEngine
    • getBetaNodes

      public List<BetaNode> getBetaNodes()