From jan@swi.psy.uva.nl  Thu Jun  3 15:21:49 1999
Received: from gollem.swi.psy.uva.nl (jan@gollem.swi.psy.uva.nl [145.18.114.15])
	by swi.swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id PAA14913
	for <prolog@swi.psy.uva.nl>; Thu, 3 Jun 1999 15:21:48 +0200 (MET DST)
Received: from localhost (localhost [[UNIX: localhost]])
	by gollem.swi.psy.uva.nl (8.8.8/8.8.8) id PAA21160;
	Thu, 3 Jun 1999 15:23:06 +0200
From: Jan Wielemaker <jan@swi.psy.uva.nl>
To: prolog@swi.psy.uva.nl, "Benjamin Hirsch" <bhirsch@wins.uva.nl>
Subject: Re: how  to save  traces
Date: Thu, 3 Jun 1999 15:17:07 +0200
X-Mailer: KMail [version 0.7.9]
Content-Type: text/plain
References: <002101beadc0$d07e0b40$0e0e8418@a2000.nl>
MIME-Version: 1.0
Message-Id: <9906031523060A.20597@gollem>
Content-Transfer-Encoding: 8bit

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

