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: