public class SimpleSentenceSolutionNode extends AbstractSolutionNode
| Modifier and Type | Field and Description |
|---|---|
private AbstractSolutionNode |
child |
private int |
limit |
private String |
type |
nodesCreated| Constructor and Description |
|---|
SimpleSentenceSolutionNode(SimpleSentence clause,
RuleSet rules,
SubstitutionSet parentSolution,
AbstractSolutionNode parentNode)
Constructor of the class.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getType()
Gets the type of the specified rule.
|
boolean |
limitExceed()
Checks if the limit of waited cycles is exceeded or not.
|
void |
limitUpdate()
Updates the limit every cycle.
|
SubstitutionSet |
nextSolution()
Creates the next solution for the simple sentence 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.
|
void |
setType(int ruleIndex)
Sets the type of the specified rule.
|
currentRuleCount, getClause, getCurrentRule, getDeepestLeaf, getParentNode, getParentSolution, getRuleSet, hasNextRule, nextRule, setDeepestLeafprivate AbstractSolutionNode child
private String type
private int limit
public SimpleSentenceSolutionNode(SimpleSentence clause, RuleSet rules, SubstitutionSet parentSolution, AbstractSolutionNode parentNode)
clause - the simple sentence 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.public void setType(int ruleIndex)
ruleIndex - the index in the set of rules, of the rule to type.public String getType()
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()public boolean limitExceed()
public void limitUpdate()