Higher-order

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

PREDICATE
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.

(Trust) 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).

PREDICATE
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.

PREDICATE

(Trust) 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.

PREDICATE

(Trust) 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

(Trust) 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).

Known bugs and planned improvements

  • Run-time checks have been reported not to work with this code. That means that either the assertions here, or the code that implements the run-time checks are erroneous.