next up previous contents
Next: Levels of Tracing Up: Tracing and Debugging Previous: Fine Tuning Tracing: Overview

Identifying Possible Bugs: Trace-bp

To identify whether FUF enters into unbounded backtracking (which is the sign of a bug in the grammar or in the input), it is useful to first monitor how many backtracking points are being used. This can be achieved by using the trace-bp (trace backtracking points) function. This is the only tracing function which can be activated even if the general tracing system is turned off (with the function trace-off). The effect of the function is to output a dot on the screen every n backtracking points, where n is 10 by default and can be changed by giving an argument to trace-bp. The form of the function is:

          
(TRACE-BP &optional n)

(TRACE-BP nil): turns off printing of .

If the string of dots becomes longer than expected, then it is worth stopping the unifier under the suspicion that something is going wrong, and to start the tracing system with trace-on.



Michael Elhadad - elhadad@cs.bgu.ac.il