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
- 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.
- Depth bounded search tree. Use with tor_merge.
- dbs(+Depth, +Goal)
- Depth bounded search.
- 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
- Iterative deepening.
- nbs(+NumberOfNodes, +Goal)
- Node-bounded search
- Node-bounded search tree. Use with tor_merge.
Throws out_of_nodes exception.
- bab(+Objective, +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.
- Factors out the common iteration part of iterative deepening and limited
- 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
- Emits a textual representation of the search tree.
This log can be turned into a PDF image using the provided tool.
- Parallel search
The following predicates are exported, but not or incorrectly documented.
- tor_before_handlers(Arg1, Arg2, Arg3)
- node_count(Arg1, Arg2)
- failure_count(Arg1, Arg2)