| java.lang.Object org.drools.common.TruthMaintenanceSystem
TruthMaintenanceSystem | public class TruthMaintenanceSystem implements Serializable(Code) | | 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.
author: Mark Proctor |
removeLogicalDependencies | public void removeLogicalDependencies(Activation activation, PropagationContext context, Rule rule) throws FactException(Code) | | An Activation is no longer true so it no longer justifies any of the logical facts
it logically asserted. It iterates over the Activation's LinkedList of DependencyNodes
it retrieves the justitication set for each DependencyNode's FactHandle and removes
itself. If the Set is empty it retracts the FactHandle from the WorkingMemory.
Parameters: activation - Parameters: context - Parameters: rule - throws: FactException - |
removeLogicalDependencies | public void removeLogicalDependencies(InternalFactHandle handle) throws FactException(Code) | | The FactHandle is being removed from the system so remove any logical dependencies
between the justified FactHandle and its justifiers. Removes the FactHandle key
from the justifiedMap. It then iterates over all the LogicalDependency nodes, if any,
in the returned Set and removes the LogicalDependency node from the LinkedList maintained
by the Activation.
See Also: LogicalDependency Parameters: handle - - The FactHandle to be removed throws: FactException - |
|
|