Did you know ... Search Documentation:
Pack tor -- prolog/tor.pl
PublicShow source

This module contains the basic Tor infrastructure for hookable disjunction as well as the definition of the search strategies.

 tor(+G1, +G2)
Hookable disjunction. This operator should be used instead of normal disjunction.
 search(+Goal)
New search scope: sets up the default handler for both hooks, that is, call/1. With this default handler, tor/2 corresponds to plain disjunction.
 tor_handlers(+Goal, +Left, +Right)
Around advice. This predicate composes the currently installed handlers with the new ones provided. Then, it runs the provided goal and finally, it resets the installed handlers.
 tor_merge(+Heuristic, +Goal)
Extracts left and right handler definitions from the source code of a high-level search heuristic definition and invokes tor_handlers.
 dbs_tree(+Depth)
Depth bounded search tree. Use with tor_merge.
 dbs(+Depth, +Goal)
Depth bounded search.
 dibs_tree(+Discrepancies)
Discrepancy-bounded search tree. Use with tor_merge. Uses prune instead of fail so it can be used to define lds in terms of it.
 dibs(+Discrepancies, +Goal)
Discrepancy-bounded search
 id(Goal)
Iterative deepening.
 nbs(+NumberOfNodes, +Goal)
Node-bounded search
 nbs_tree(+NodesVar)
Node-bounded search tree. Use with tor_merge. Throws out_of_nodes exception.
 bab(+Objective, +Goal)
Branch-and-bound
 lds(+Goal)
Limited discrepancy search
 dbs(+Level, +Method, +Goal)
Variant on depth-bounded search. When the depth bound is reached, it does not prune the remaining subtree, but activates the search method Method.
 iterate(+PGoal)
Factors out the common iteration part of iterative deepening and limited discrepancy search.
 tor_statistics(+Goal)
Prints statistics about the search:
  • number of solutions
  • number of nodes processed
  • number of failures
 solution_count(+SolutionVar, +Goal)
Count solutions using provided nonbacktrackable variable
 log(+Goal)
Emits a textual representation of the search tree. This log can be turned into a PDF image using the provided tool.
 parallel(+Goal)
Parallel search

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

 tor_before_handlers(Arg1, Arg2, Arg3)
 node_count(Arg1, Arg2)
 failure_count(Arg1, Arg2)