public class AndSolutionNode extends AbstractSolutionNode
| Modifier and Type | Field and Description |
|---|---|
private AbstractSolutionNode |
headSolutionNode |
private Clause |
operatorTail |
private AbstractSolutionNode |
tailSolutionNode |
nodesCreated| Constructor and Description |
|---|
AndSolutionNode(And clause,
RuleSet rules,
SubstitutionSet parentSolution,
AbstractSolutionNode parentNode)
Constructor of the class.
|
| Modifier and Type | Method and Description |
|---|---|
protected AbstractSolutionNode |
getHeadSolutionNode()
Gets the solution node of the and clause's head.
|
protected AbstractSolutionNode |
getTailSolutionNode()
Gets the solution node of the and clause's tail.
|
SubstitutionSet |
nextSolution()
Creates the next solution for the and 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, setDeepestLeafprivate AbstractSolutionNode headSolutionNode
private AbstractSolutionNode tailSolutionNode
private Clause operatorTail
public AndSolutionNode(And clause, RuleSet rules, SubstitutionSet parentSolution, AbstractSolutionNode parentNode)
clause - the and 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 AbstractSolutionNode getHeadSolutionNode()
This is based on the representation of an and clause. See And
class for more details.
AbstractSolutionNode representing the solution node of
the head.protected AbstractSolutionNode getTailSolutionNode()
This is based on the representation of an and clause. See And
class for more details.
AbstractSolutionNode representing the solution node of
the tail.protected void reset(SubstitutionSet newParentSolution, RuleSet newRuleSet)
reset in class AbstractSolutionNodenewParentSolution - the new parent solution of the subtree.newRuleSet - the new state of the database.AbstractSolutionNode.reset(model.SubstitutionSet,
model.RuleSet)public SubstitutionSet nextSolution()
null if there no other different solution.nextSolution in class AbstractSolutionNodeSubstitutionSet object representing the bindings of the
next solution or null if there is no next solution.AbstractSolutionNode.nextSolution()