Noeud: Control, Noeud « Next »: , Noeud « Previous »: Comparison of Terms, Noeud « Up »: Built-In Predicates



Control

+P , +Q
Prove P and if it succeeds, then prove Q.
+P ; +Q
Prove P or Q.
\+ +Guard
If the guard Guard has a solution, fail, otherwise succeed.
+Guard -> +Q ; +R

+Q is called for every possible solutions of Guard. +R is only called if Guard has no solutions.

+Guard -> +Q
Analogous to +Guard -> +Q;fail
true
Always succeed.
fail
Always fail.
wait(+Goal)
Wait the full completion of the evaluation of Goal before evaluating its continuation. Still very experimental!

The library call provide the additionnal predicate:

call(Goal)
If Goal is instantiated to a term which would be acceptable as the body of a clause, then the goal call(Term) is executed exactly as if that term appeared textually in its place. There are some restrictions on Goal.