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

Documentation on exports

PREDICATE

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