Class UnifyWithOccursCheck
- java.lang.Object
-
- org.projog.core.predicate.AbstractSingleResultPredicate
-
- org.projog.core.predicate.builtin.compare.UnifyWithOccursCheck
-
- All Implemented Interfaces:
KnowledgeBaseConsumer,PredicateFactory
public final class UnifyWithOccursCheck extends AbstractSingleResultPredicate
unify_with_occurs_check(X, Y)- an equality test using sound unification.Works like
X = Ybut with an additional check to avoid cyclic terms. When usingunify_with_occurs_checka variable can only be unified with a term if that term does not contain the variable.
-
-
Constructor Summary
Constructors Constructor Description UnifyWithOccursCheck()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanevaluate(Term arg1, Term arg2)private booleanisCyclic(Term t)private booleanisCyclic(Term t, java.util.Set<Term> parents)-
Methods inherited from class org.projog.core.predicate.AbstractSingleResultPredicate
evaluate, evaluate, evaluate, evaluate, evaluate, getArithmeticOperators, getFileHandles, getKnowledgeBase, getOperands, getPredicate, getPredicates, getProjogListeners, getSpyPoints, getTermFormatter, init, isRetryable, setKnowledgeBase
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.projog.core.predicate.PredicateFactory
isAlwaysCutOnBacktrack
-
-