Author(s): Daniel Cabeza, Manuel Hermenegildo.
Version: 1.3#120 (1999/11/26, 12:5:17 MET)
Version of last change: 1.3#99 (1999/11/12, 16:28:6 MET)
This module contains the set of basic control predicates, except the predicates dealing with exceptions, which are in section Exception handling.
basiccontrol
)basiccontrol
)
P , Q
Conjunction (P
and Q
).
Usage: +callable , +callable
* ISO *
P ; Q
Disjunction (P
or Q
).
Usage: +callable ; +callable
* ISO *
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
.
Usage: +callable -> +callable
* ISO *
Usage: * ISO *
\+ P
Goal P
is not provable (negation by failure). Fails if P
has a solution, and succeeds otherwise. No cuts are allowed in P
.
Usage: \+ +callable
* ISO *
if(P,Q,R)
If P
then Q
else R
, exploring all solutions of P
. No cuts are allowed in P
.
Usage: if(+callable,+callable,+callable)
The predicate is of type implicit.
Usage: * ISO *
The predicate is of type implicit.
Usage: * ISO *
The predicate is of type implicit.
Usage: * ISO *
call(G)
Executes goal G
, restricting the scope of the cuts to the execution of G
. Writing a variable G
in a goal position is equivalent.
Meta-predicate of type implicit with arguments: call(goal)
.
Usage: call(+callable)
* ISO *
basiccontrol
)An alias for disjunction (when appearing outside a list). The alias is performed when terms are read in.
call(Pred,Arg1)
There exists a set of builtin predicates of the form
call/N
such that execute predicate Pred
given arguments Arg1
... ArgX
, if Pred
has already arguments the new ones are added to the start. This predicate can be written using the special Ciao syntax Pred(Arg1,...,ArgX)
.
Usage: call(+callable,?)
Go to the first, previous, next, last section, table of contents.