Class Disjunction
java.lang.Object
org.projog.core.predicate.AbstractPredicateFactory
org.projog.core.predicate.builtin.compound.Disjunction
- All Implemented Interfaces:
KnowledgeBaseConsumer, PredicateFactory, PreprocessablePredicateFactory
public final class Disjunction
extends AbstractPredicateFactory
implements PreprocessablePredicateFactory
X;Y - disjunction.
X;Y specifies a disjunction of goals. X;Y succeeds if either X succeeds
or Y succeeds. If X fails then an attempt is made to satisfy Y. If
Y fails the entire disjunction fails.
Note: The behaviour of this predicate changes when its first argument is of the form ->/2,
i.e. the "if/then" predicate. When a ->/2 predicate is the first argument of a
;/2 predicate then the resulting behaviour is a "if/then/else" statement of the form
((if->then);else).
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final classprivate classprivate static class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate Disjunction.DisjunctionPredicatecreateDisjunction(Term firstArg, Term secondArg) private PredicatecreateIfThenElse(Term ifThenTerm, Term elseTerm) protected PredicategetPredicate(Term firstArg, Term secondArg) preprocess(Term term) Methods inherited from class AbstractPredicateFactory
getArithmeticOperators, getFileHandles, getKnowledgeBase, getOperands, getPredicate, getPredicate, getPredicate, getPredicate, 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
getPredicate, isAlwaysCutOnBacktrack, isRetryable
-
Constructor Details
-
Disjunction
public Disjunction()
-
-
Method Details
-
preprocess
- Specified by:
preprocessin interfacePreprocessablePredicateFactory
-
getPredicate
- Overrides:
getPredicatein classAbstractPredicateFactory
-
createIfThenElse
-
createDisjunction
-