Author(s): Daniel Cabeza, Manuel Hermenegildo.
Version: 1.5#118 (2000/4/19, 18:13:43 CEST)
Version of last change: 1.5#66 (2000/3/16, 17:3:30 CET)
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 2: * ISO *
P
is a term which represents a goal, i.e., an atom or a structure.
(basic_props:callable/1
)
Q
is a term which represents a goal, i.e., an atom or a structure.
(basic_props:callable/1
)
P ; Q
Disjunction (P
or Q
).
Usage 2: * ISO *
P
is a term which represents a goal, i.e., an atom or a structure.
(basic_props:callable/1
)
Q
is a term which represents a goal, i.e., an atom or a structure.
(basic_props:callable/1
)
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 2: * ISO *
P
is a term which represents a goal, i.e., an atom or a structure.
(basic_props:callable/1
)
Q
is a term which represents a goal, i.e., an atom or a structure.
(basic_props:callable/1
)
Usage 1: * ISO *
Usage 2: * 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 2: * ISO *
P
is a term which represents a goal, i.e., an atom or a structure.
(basic_props:callable/1
)
if(P,Q,R)
If P
then Q
else R
, exploring all solutions of P
. No cuts are allowed in P
.
Usage 2:
P
is a term which represents a goal, i.e., an atom or a structure.
(basic_props:callable/1
)
Q
is a term which represents a goal, i.e., an atom or a structure.
(basic_props:callable/1
)
R
is a term which represents a goal, i.e., an atom or a structure.
(basic_props:callable/1
)
Usage 1: * ISO *
Usage 2: * ISO *
Usage 1: * ISO *
Usage 2: * ISO *
Usage 1: * ISO *
Usage 2: * 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 with arguments: call(goal)
.
Usage 2: * ISO *
G
is a term which represents a goal, i.e., an atom or a structure.
(basic_props:callable/1
)
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)
.
Go to the first, previous, next, last section, table of contents.