Subject: Re: how to save traces

From: Jan Wielemaker <[email-masked]>
Date: Thu, 3 Jun 1999 15:17:07 +0200

On Thu, 03 Jun 1999, Benjamin Hirsch wrote:

> is there a way (or is it planned) to be able to save traces? I have
> prolog programms where I's like to skip through, and later on examine
> certain paths in depth. Now I always have to start again, which kosts
> an awful amount of time....

Once upon a time, I wrote something like that.  It can be written fairly
trivial by defining user:prolog_trace_interception/4 and a visualisation
that suits your purpose (about 1 page should give a good start).  See
manual.  Mine has been lost ...

Basically, the answer is to write as much as possible side-effect-free
code (especially assert/retract, recorda/recorded, etc).  In that case
you simply debug by skipping everything at in the toplevel clause until
something weird happens, do a `r' (retry), creep into the predicate and
do the same trick.

	Regards --- Jan