Higher-order support

Author(s): Daniel Cabeza.

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:callable/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)

There exists a set of builtin predicates of the form call/N with N > 1 which execute predicate Pred given arguments Arg1 ... ArgX. If Pred has already arguments Arg1 is added to the start, the rest to the end. This predicate, when Pred is a variable, can be written using the special Ciao syntax Pred(Arg1,...,ArgX).

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:callable/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:callable/1)Arg1 is a term which represents a goal, i.e., an atom or a structure.

Usage:

  • The following properties should hold at call time:
    (basic_props:callable/1)Arg1 is a term which represents a goal, i.e., an atom or a structure.
Meta-predicate with arguments: $nodebug_call(goal).

PREDICATE$meta_call/1

Usage:$meta_call(A)

  • The following properties should hold at call time:
    (term_typing:nonvar/1)A is currently a term which is not a free variable.
    (basic_props:callable/1)A is a term which represents a goal, i.e., an atom or a structure.
  • The following properties hold globally:
    (basic_props:native/2)This predicate is understood natively by CiaoPP as call(A).

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: