Previous: , Up: ref-sem   [Contents][Index]


4.2.8 Summary of Control Predicates

:P,:Q           ISO

prove P and Q

:P;:Q           ISO

prove P or Q

+M::P           ISO

call P in module M

:P->:Q;:R           ISO

if P succeeds, prove Q; if not, prove R

:P->:Q           ISO

if P succeeds, prove Q; if not, fail

!           ISO

cut any choices taken in the current procedure

\+ :P           ISO

goal P is not provable

?X ^ :P

there exists an X such that P is provable (used in setof/3 and bagof/3)

block :P   declaration

declaration that predicates specified by P should block until sufficiently instantiated

call(:P)   ISO
call(:P,…)   ISO

execute P or P(…)

call_cleanup(:Goal,:Cleanup)

Executes the procedure call Goal. When Goal succeeds determinately, is cut, fails, or raises an exception, Cleanup is executed.

call_residue_vars(:Goal,?Vars)

Executes the procedure call Goal. Vars is unified with the list of new variables created during the call that remain unbound and have blocked goals or attributes attached to them.

+Iterators do :Body

executes Body iteratively according to Iterators

fail           ISO

fail (start backtracking)

false           ISO

same as fail

freeze(+Var,:Goal)

Blocks Goal until nonvar(Var) holds.

if(:P,:Q,:R)

for each solution of P that succeeds, prove Q; if none, prove R

once(:P)           ISO

Find the first solution, if any, of goal P.

otherwise

same as true

repeat           ISO

succeed repeatedly on backtracking

true           ISO

succeed

when(+Cond,:Goal)

block Goal until Cond holds



Send feedback on this subject.