Runtime predicates for call on determinate

Author(s): Jose F. Morales, Manuel Carro.

Implementation of variant of call and cut which executes pending goals when the computation has no more alternatives.

Usage and interface

  • Library usage:
    :- use_module(library(det_hook/det_hook_rt)).
  • Exports:

Documentation on exports

PREDICATEdet_try/3

Usage:det_try(Goal,OnCut,OnFail)

Action is called, and OnCut and OnFail are goals to be executed when Goal is cut or when it finitely fails, respectively. In order for this to work, cutting must be performed in a special way, by using the !!/0 predicate, also provided by this module.

  • The following properties should hold at call time:
    (basic_props:cgoal/1)Goal is a term which represents a goal, i.e., an atom or a structure.
    (basic_props:cgoal/1)OnCut is a term which represents a goal, i.e., an atom or a structure.
    (basic_props:cgoal/1)OnFail is a term which represents a goal, i.e., an atom or a structure.
Meta-predicate with arguments: det_try(goal,goal,goal).

Documentation on imports

This module has the following direct dependencies: