Byrd box tracing model

Author(s): Francisco Bueno.

This module can be used to spy predicates in a program. Spying means here to display messages at the call, exit, fail and redo ports of goals for the predicate spied.

In order to spy a predicate using this module a program expansion has to be performed on the program module defining the predicate. This is achieved by the byrdbox package.

This library is a programming exercise in CIAO expansion packages. It is meanly intended as an auxiliary library for library(tracing).

Usage and interface

  • Library usage:
    :- use_package(byrdbox).

    in the program module defining the code to be spied; or

    :- use_module(library(byrdbox/byrd)).

    to call the predicates exported by this module.

  • Exports:

Documentation on exports


Turns spying of predicate F/A in module M on. Declarations of the form spy(F/A) (where M is implicitly taken as the module where the declaration appears) can also be used, as long as the byrdbox package is included.


Turns spying of predicate F/A in module M off.


Displays messages at the ports of Goal, as long as spying is on for its predicate. Meta-predicate with arguments: trace(goal).


Displays messages at the ports of Goal. Meta-predicate with arguments: trace0(goal).

Documentation on imports

This module has the following direct dependencies: