edu.cs.ai.kreator.logic.prolog
Class RuleSldNode

java.lang.Object
  extended by edu.cs.ai.kreator.logic.prolog.AbstractSldNode
      extended by edu.cs.ai.kreator.logic.prolog.RuleSldNode

public class RuleSldNode
extends AbstractSldNode

This class models a rule node in the SLD resolution tree of a prolog query.

Author:
Matthias Thimm

Constructor Summary
RuleSldNode(Clause clause, java.util.List<AtomExpression> evidences)
          Constructs a rule node with the given clause.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 boolean isEntailed(PrologProgram program, NodeCollection nodes)
          Checks whether the atom encapsulated in this node is entailed by program in the current step of SLD resolution.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuleSldNode

public RuleSldNode(Clause clause,
                   java.util.List<AtomExpression> evidences)
Constructs a rule node with the given clause.

Parameters:
clause - a bayesian clause.
Method Detail

isEntailed

public boolean isEntailed(PrologProgram program,
                          NodeCollection nodes)
                   throws CycleFoundException
Description copied from class: AbstractSldNode
Checks whether the atom encapsulated in this node is entailed by program in the current step of SLD resolution.

Specified by:
isEntailed in class AbstractSldNode
Parameters:
program - a prolog program
nodes - a node collection
Returns:
"true" if query is entailed
Throws:
CycleFoundException - if there is a cycle in this prolog program that forbids inference.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object