[ 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 context 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.
- call(+Goal)
- Succeeds if Goal succeeds.
- call(+GoalPrefix, ?Arg, ?...)
- Call with any number of additional arguments
- catch(+Goal, ?Catcher, +Recovery)
- Equivalent to call(Goal) if Goal succeeds or fails.
If Goal throws an exception that unifies with Catcher, Recovery is executed
- +IterationSpecs do +Goals
- Execute Goals iteratively according to IterationSpecs.
- 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.
- 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.
- throw(+Ball)
- Throw an exception described by Ball. Continue execution
at the recovery procedure of a matching ancestor catch/3
- true
- Succeeds always.
- ~ +Goal
- The sound negation operator. If Goal is not ground, the predicate delays.
Generated from control.eci on 2022-09-03 14:26