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

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

public class VariableSldNode
extends AbstractSldNode

This class models a variable node in the SLD resolution tree of a Prolog query.

Author:
Matthias Thimm

Constructor Summary
VariableSldNode(GeneralizedAtom atom, java.util.List<AtomExpression> evidences)
          Constructs a new node with the given bayesian atom.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 GeneralizedAtom getAtom()
           
 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

VariableSldNode

public VariableSldNode(GeneralizedAtom atom,
                       java.util.List<AtomExpression> evidences)
Constructs a new node with the given bayesian atom.

Parameters:
atom - a bayesian atom
evidences - additional evidences to be considered.
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.

getAtom

public GeneralizedAtom getAtom()

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