|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.drools.common.TruthMaintenanceSystem
public class TruthMaintenanceSystem
The Truth Maintenance System is responsible for tracking two things. Firstly It maintains a Map to track the classes with the same Equality, using the EqualityKey. The EqualityKey has an internal datastructure which references all the handles which are equal. Secondly It maintains another map tracking the justificiations for logically asserted facts.
Constructor Summary | |
---|---|
TruthMaintenanceSystem(AbstractWorkingMemory workingMemory)
|
Method Summary | |
---|---|
void |
addLogicalDependency(InternalFactHandle handle,
Activation activation,
PropagationContext context,
Rule rule)
Adds a justification for the FactHandle to the justifiedMap. |
EqualityKey |
get(EqualityKey key)
|
EqualityKey |
get(java.lang.Object object)
|
java.util.Map |
getAssertMap()
|
PrimitiveLongMap |
getJustifiedMap()
|
java.lang.Object |
put(EqualityKey key)
|
EqualityKey |
remove(EqualityKey key)
|
void |
removeLogicalDependencies(Activation activation,
PropagationContext context,
Rule rule)
An Activation is no longer true so it no longer justifies any of the logical facts it logically asserted. |
void |
removeLogicalDependencies(InternalFactHandle handle)
The FactHandle is being removed from the system so remove any logical dependencies between the justified FactHandle and its justifiers. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TruthMaintenanceSystem(AbstractWorkingMemory workingMemory)
Method Detail |
---|
public PrimitiveLongMap getJustifiedMap()
public java.util.Map getAssertMap()
public java.lang.Object put(EqualityKey key)
public EqualityKey get(EqualityKey key)
public EqualityKey get(java.lang.Object object)
public EqualityKey remove(EqualityKey key)
public void removeLogicalDependencies(Activation activation, PropagationContext context, Rule rule) throws FactException
activation
- context
- rule
-
FactException
public void removeLogicalDependencies(InternalFactHandle handle) throws FactException
handle
- - The FactHandle to be removed
FactException
LogicalDependency
public void addLogicalDependency(InternalFactHandle handle, Activation activation, PropagationContext context, Rule rule) throws FactException
handle
- activation
- context
- rule
-
FactException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |