Go to the first, previous, next, last section, table of contents.


Control constructs/predicates

Author(s): Daniel Cabeza, Manuel Hermenegildo.

Version: 1.10#7 (2006/4/26, 19:22:13 CEST)

Version of last change: 1.9#316 (2004/2/25, 19:16:1 CET)

This module contains the set of basic control predicates, except the predicates dealing with exceptions, which are in section Exception handling.

Usage and interface (basiccontrol)

Documentation on exports (basiccontrol)

PREDICATE: ,/2:

P , Q

Conjunction (P and Q).

PREDICATE: ;/2:

P ; Q

Disjunction (P or Q).

PREDICATE: ->/2:

P -> Q

If P then Q else fail, using first solution of P only. Also, (P -> Q ; R), if P then Q else R, using first solution of P only. No cuts are allowed in P.

PREDICATE: !/0:

Usage: * ISO *

PREDICATE: \+/1:

\+ P

Goal P is not provable (negation by failure). Fails if P has a solution, and succeeds otherwise. No cuts are allowed in P.

Meta-predicate with arguments: \+goal.

General properties: \+ X

PREDICATE: if/3:

if(P, Q, R)

If P then Q else R, exploring all solutions of P. No cuts are allowed in P.

PREDICATE: true/0:

Usage: * ISO *

PREDICATE: fail/0:

Usage: * ISO *

PREDICATE: repeat/0:

Usage: * ISO *

PREDICATE: call/1:

call(G)

Executes goal G, restricting the scope of the cuts to the execution of G. Equivalent to writing a variable G in a goal position.

Meta-predicate with arguments: call(goal).

Documentation on internals (basiccontrol)

PREDICATE: |/2:

An alias for disjunction (when appearing outside a list). The alias is performed when terms are read in.


Go to the first, previous, next, last section, table of contents.