next up previous index
Next: Depth-First Iterative Deepening Up: Libraries Previous: Checking Files

Bounded Depth-First Search

      This library (loaded with :- lib(dfid))defines predicates for bounded depth-first search, which can replace the usual depth first search in cases when a complete proof procedure is needed. By limiting the number of ancestors of each goal infinite paths can be cut down and endless loops eliminated, of course assuming that the cut branch did not contain a solution.

The library provides two basic ways to use the depth limitations: depth-first iterative deepening and plain bounded depth-first search. Both require that programs which should be executed with this search strategy are compiled with the dfid_compile compiler flag. Predicates which are compiled without it can be called as well, but their depth will not be taken into account, and they will be executed using the standard depth-first rule. Since this is more efficient, code which is known not to contain any infinite loops can be compiled without the dfid_compile flag, and only the potentially non-terminating parts have to be compiled using the flag. Predicates compiled with and without the flag can be freely mixed.





Micha Meier
Mon Mar 4 12:11:45 MET 1996