[ The ECLiPSe Built-In Predicates | 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.
- +Goal1 , +Goal2
- Comma (AND) operator - succeeds if the goals Goal1 and Goal2 both succeed
- +Condition -> +Then ; +Else
- Conditional construct - succeeds if either Condition succeeds, and then Goal2
succeeds; or else if Condition fails, and then 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, ?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 Sat Aug 7 01:44:13 2004