Higher-order support

Author(s): Daniel Cabeza, Jose F. Morales (improvements).

This module is a wrapper for the implementation-defined predicate call/1, and it implements the call/2 predicate.

Usage and interface

Documentation on exports

PREDICATEcall/1
call(G)

Executes goal G, restricting the scope of the cuts to the execution of G. Equivalent to writing a variable G in a goal position.

Usage:ISO

  • The following properties should hold at call time:
    (basic_props:cgoal/1)G is a term which represents a goal, i.e., an atom or a structure.
  • The following properties hold globally:
    (basic_props:native/1)This predicate is understood natively by CiaoPP.
Meta-predicate with arguments: call(goal).

PREDICATEcall/2
call(Pred,Arg1)

The family of builtin predicates of the form call/N with N > 1 execute the predicate Pred applying arguments Arg1 ... ArgN. If Pred has already M arguments, Arg1 ... ArgN are added to the end resulting in a call to a predicate of arity M+N. When using the hiord package, the Pred(Arg1,...,ArgN) syntax (with Pred a variable) is accepted as equivalent to call(Pred, Arg1, ..., ArgN).

Usage:

  • Call and exit should be compatible with:
    (basic_props:term/1)Arg1 is any term.
  • The following properties should hold at call time:
    (basic_props:cgoal/1)Pred is a term which represents a goal, i.e., an atom or a structure.
  • The following properties should hold upon exit:
    (basic_props:term/1)Arg1 is any term.
  • The following properties should hold globally:
    (basic_props:native/1)This predicate is understood natively by CiaoPP.

PREDICATESYSCALL/1

Usage:

  • The following properties should hold at call time:
    (basic_props:cgoal/1)Arg1 is a term which represents a goal, i.e., an atom or a structure.

PREDICATEthis_module/1

Usage:this_module(Module)

Module is the internal module identifier for current module.

Meta-predicate with arguments: this_module(addmodule(?)).

Documentation on imports

This module has the following direct dependencies: