FASILL documentation Predicate Reference control constructs

Control constructs

The predicates of this section implement control structures.

','/2

Conjunction.

','( +callable_term, +callable_term )

','(First, Second) is true if and only if First is true and Second is true.

';'/2

Disjunction.

';'( +callable_term, +callable_term )

';'(Either, Or) is true if and only if either Either or Or is true.

call/3

Invoke a callable term as a goal.

call( +callable_term[, @term, ...] )

call(Goal, Arg1, ..., ArgN) is true if and only if Goal represents a goal which is true for the (optional) arguments Arg1, ..., ArgN.

throw/1

Raise an exception.

throw( +term )

throw(Exception) raise the Exception exception. The system looks for the innermost catch/3 ancestor for which Exception unifies with the Catcher argument of the catch/3 call.

catch/3

Enable recovery from exceptions.

catch( +callable_term, ?term, +callable_term )

catch(Goal, Catcher, Handler) behaves as call/1 if no exception is raised when executing Goal. If an exception is raised using throw/1 while Goal executes, and the Goal is the innermost goal for which Catcher unifies with the argument of throw/1, all choice points generated by Goal are cut, the system backtracks to the start of catch/3 while preserving the thrown exception term, and Handler is called as in call/1.

top/0

True.

top

top is always true with the maximum truth degree of the lattice.

bot/0

Fail.

bot

bot is always true with the minimum truth degree of the lattice.

truth_degree/2

Truth degree.

truth_degree( +callable_tem, ?term )

truth_degree(Goal, TD) is true if TD is the truth degree for the goal Goal.

guards/1

Guards.

guards( on )

Guards on control construct.