Go to the first, previous, next, last section, table of contents.


Breadth-first execution

Author(s): Daniel Cabeza, Manuel Carro.

This package implements breadth-first execution of predicates. Predicates written with operators '<-'/1 (facts) and '<-'/2 (clauses) are executed using breadth-first search. This may be useful in search problems when a complete proof procedure is needed. An example of code would be:

:- module(bf_example, _, [bf]).

test(bf) :- bfchain(a,d).
test(df) :- chain(a,d).   % loops!

bfchain(X,X) <- .
bfchain(X,Y) <- arc(X,Z), bfchain(Z,Y).

chain(X,X).
chain(X,Y) :- arc(X,Z), chain(Z,Y).

arc(a,b).
arc(a,d).
arc(b,c).
arc(c,a).

Usage and interface (bf)

Known bugs and planned improvements (bf)


Go to the first, previous, next, last section, table of contents.