Interface InferenceEngine
- All Known Implementing Classes:
ReteEngine
public interface InferenceEngine
The inference engine is responsible for matching rules against facts (objects)
and executing them.
- Since:
- 2.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a fact (data object) to the working memory.voidAdds a rule to the knowledge base.voidclears the working memory.voidTriggers the inference cycle.getFacts()Retrieves all facts currently in the working memory.voidremoveFact(Object fact) Removes a fact from the working memory.
-
Method Details
-
addRule
-
addFact
Adds a fact (data object) to the working memory.- Parameters:
fact- the object to be reasoned about.
-
removeFact
Removes a fact from the working memory.- Parameters:
fact- the object to remove.
-
fireRules
void fireRules()Triggers the inference cycle. Automatically matches rules against facts and executes them. -
getFacts
Collection<Object> getFacts()Retrieves all facts currently in the working memory.- Returns:
- a collection of facts.
-
clearFacts
void clearFacts()clears the working memory.
-