public class NotSolutionNode extends AbstractSolutionNode
Modifier and Type | Field and Description |
---|---|
private boolean |
solutionFlag |
private AbstractSolutionNode |
tailSolutionNode |
nodesCreated
Constructor and Description |
---|
NotSolutionNode(Not clause,
RuleSet rules,
SubstitutionSet parentSolution,
AbstractSolutionNode parentNode)
Constructor of the class.
|
Modifier and Type | Method and Description |
---|---|
protected AbstractSolutionNode |
getTailSolutionNode()
Gets the solution node of the not clause's tail.
|
SubstitutionSet |
nextSolution()
Creates the next solution for the negative clause of the node.
|
protected void |
reset(SubstitutionSet newParentSolution,
RuleSet newRuleSet)
Resets the subtree to the new state of the database and resets all the
counters that prevent from infinite evaluation of the node.
|
currentRuleCount, getClause, getCurrentRule, getDeepestLeaf, getParentNode, getParentSolution, getRuleSet, hasNextRule, nextRule, setDeepestLeaf
private AbstractSolutionNode tailSolutionNode
private boolean solutionFlag
public NotSolutionNode(Not clause, RuleSet rules, SubstitutionSet parentSolution, AbstractSolutionNode parentNode)
clause
- the negative clause to be proved by this subtree.rules
- the rules representing context of the proof.parentSolution
- the solution of the parent node in the tree of proof.parentNode
- the parent node in the tree of proof.protected void reset(SubstitutionSet newParentSolution, RuleSet newRuleSet)
reset
in class AbstractSolutionNode
newParentSolution
- the new parent solution of the subtree.newRuleSet
- the new state of the database.AbstractSolutionNode.reset(model.SubstitutionSet,
model.RuleSet)
protected AbstractSolutionNode getTailSolutionNode()
This is based on the representation of an not clause. See Not
class for more details.
AbstractSolutionNode
representing the solution node of
the tail.public SubstitutionSet nextSolution()
null
if there no other different solution.nextSolution
in class AbstractSolutionNode
SubstitutionSet
object representing the bindings of the
next solution or null
if there is no next solution.AbstractSolutionNode.nextSolution()