Class Dif
java.lang.Object
org.projog.core.predicate.AbstractSingleResultPredicate
org.projog.core.predicate.builtin.reif.Dif
- All Implemented Interfaces:
KnowledgeBaseConsumer, PredicateFactory
dif(X,Y) - enforces restriction that the two given terms are never equal.
If X and Y cannot unify then the goal succeeds. If X and Y are
equal then the goal fails. If X and Y could unify then a restriction is added to prevent
X and Y from unifying in the future.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classprivate static final class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidappendAttribute(Variable v, Term attributeElement) private TermcreateTerm(List<? extends Term> args) booleanMethods inherited from class AbstractSingleResultPredicate
evaluate, evaluate, evaluate, evaluate, evaluate, getArithmeticOperators, getFileHandles, getKnowledgeBase, getOperands, getPredicate, getPredicates, getProjogListeners, getSpyPoints, getTermFormatter, init, isRetryable, setKnowledgeBaseMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PredicateFactory
isAlwaysCutOnBacktrack
-
Field Details
-
ATTRIBUTE_KEY
-
-
Constructor Details
-
Dif
public Dif()
-
-
Method Details
-
evaluate
- Overrides:
evaluatein classAbstractSingleResultPredicate
-
createTerm
-
appendAttribute
-