[ Reference Manual | Alphabetic Index ]

Control

Built-ins and language constructs to control execution

Predicates

!
Cut - succeeds and removes all choice points between cut and parent goal.
+Condition *-> +Then ; +Else
Soft-cut-conditional construct - succeeds if Then succeeds for some solution of Condition, or if Condition fails and Else succeeds
+Goal1 , +Goal2
Comma (AND) operator - succeeds if the goals Goal1 and Goal2 both succeed
+Condition -> +Then ; +Else
Conditional construct - succeeds if Then succeeds for the first solution of Condition, or if Condition fails and Else succeeds.
-?-> ?Body
The matching operator. The head of the clause which contains it will not be unified with the caller, one-way matching will be used instead.
+LookupModule : +Goal
Call the procedure visible in LookupModule rather than the caller module
+Goal1 ; +Goal2
Semicolon (OR) operator - Succeeds if the goal Goal1 succeeds or if the goal Goal2 succeeds.
Goal @ ContextModule
Goal is executed in the calling context of ContextModule.
\+ +Goal
Succeeds if Goal cannot be satisfied. Uses negation as failure (synonym of not/1).
+Vars ^ +Goal
Succeeds if Goal succeeds.
abort
The current computation is aborted and control is returned to the top level.
block(+Goal, ?Tag, +Recovery)
Similar to call(Goal) if Goal succeeds or fails. If an exit_block/1 is executed inside Goal, whose argument unifies with Tag, then Recovery is executed.
call(+Goal)
Succeeds if Goal succeeds.
+IterationSpecs do +Goals
Execute Goals iteratively according to IterationSpecs.
exit_block(++TagExit)
Continues the program at the recovery procedure of the block/3 predicate whose Tag argument unifies with TagExit.
fail
Does not succeed. A synonym of false/0.
false
Does not succeed (synonym of fail/0).
fork(+Max, -I)
Succeeds for all integers I between 1 and Max. The solutions are generated in parallel.
mutex(+MutexId, +Goal)
Equivalent to once(Goal) but with mutual exclusion among parallel workers.
mutex_init(+MutexId)
Initialise the mutual exclusion lock MutexId
not +Goal
Succeeds if Goal cannot be satisfied (uses negation as failure).
once +Goal
Succeeds if Goal succeeds, and removes all its alternatives --- equivalent to call((Goal, !))
phrase(+Grammar, ?List)
Succeeds if List unifies with a list from the specified grammar Grammar.
phrase(+Grammar, ?Tokens, ?Remainder)
Succeeds if Tokens can be parsed as part of the grammar defined in Grammar and Remainder contains any remaining terms in Tokens.
repeat
Succeeds as often as tried.
true
Succeeds always.
~ +Goal
The sound negation operator. If Goal is not ground, the predicate delays.

Generated from control.eci on 2009-02-24 09:39