Class WorkingMemory
java.lang.Object
FAtiMA.Core.memory.semanticMemory.WorkingMemory
- All Implemented Interfaces:
Serializable
Implements a knowledge structure that stores properties and predicates about the
world for current processes (new data or data retrieved from the knowledge base.
Provides a very fast method of searching for the information stored inside it.
This structure also provides a limited kind of Logical Inference that can be
applied to generate new properties and predicates. This logical inference is
performed by specific inference operators that must be explicitly added to the WM.
When the WM buffer is full, data will be transfer to the KnowledgeBase (LTM) based
on first in first out mechanism.
- Author:
- Meiyii Lim
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClear()Empties the WorkingMemoryvoidintCount()GetObjectDetails(String objectName) GetObjectProperty(String objectName, String property) GetPossibleBindings(Name name) booleanGets a value that indicates whether new Knowledge has been added to the WorkingMemory since the last inference processvoidputFact(KnowledgeSlot ks) voidRearrangeWorkingMemory(Name predicate, Object value) Rearrange the working memory entries so that the most current accessed entry comes lastvoidvoidRemoves a predicate from the WorkingMemoryvoidTell(KnowledgeBase kb, Name property, Object value) Adds a new property or sets its value (if already exists) in the WorkingMemorytoString()Converts the Information stored in the WM to one StringtoXML()
-
Field Details
-
MAXENTRY
public static final short MAXENTRY- See Also:
-
-
Constructor Details
-
WorkingMemory
public WorkingMemory()Creates a new Empty WorkingMemory
-
-
Method Details
-
Ask
-
Clear
public void Clear()Empties the WorkingMemory -
ClearChangeList
public void ClearChangeList() -
Count
public int Count() -
GetChangeList
-
GetFactList
-
GetNewFacts
-
putFact
-
HasNewKnowledge
public boolean HasNewKnowledge()Gets a value that indicates whether new Knowledge has been added to the WorkingMemory since the last inference process- Returns:
- true if there is new Knowledge in the WM, false otherwise
-
RearrangeWorkingMemory
Rearrange the working memory entries so that the most current accessed entry comes last -
ResetNewKnowledge
public void ResetNewKnowledge() -
Retract
Removes a predicate from the WorkingMemory- Parameters:
predicate- - the predicate to be removed
-
Tell
Adds a new property or sets its value (if already exists) in the WorkingMemory- Parameters:
property- - the property to be added/changedvalue- - the value to be stored in the property
-
GetPossibleBindings
-
GetObjectDetails
-
GetObjectProperty
-
toString
Converts the Information stored in the WM to one String -
toXML
-