grades & options for tracing and debugging

Lee Naish lee at cs.mu.OZ.AU
Tue Mar 17 12:46:05 AEDT 1998


In article <Pine.GSO.3.95.980316130236.15890D-100000 at lister.cs.mu.OZ.AU>, Peter Schachte <pets at students.cs.mu.oz.au> writes:
> On Fri, 13 Mar 1998, Fergus Henderson wrote:

> One question not quite answered by this:  how do you treat tail recursive
> predicates?  In the redesign of the Quintus debugger we quite deliberately
> decided to make the debugger reflect the actual execution of the program,
> rather than the naive view of the execution.  So a recursive call will have
> a call port but no corresponding exit port:  a call to append([1,2,3],X,Y)
> will have a call port for each tail of the list [1,2,3], but only an exit
> for the first call.  This reflects the execution.  Of course, append isn't
> tail recursive under Mercury, but you get the idea.  I never heard of a
> complaint from anyone who wanted to see all those exit ports.

I would certainly miss those ports when debugging wrong answers
(I might even go so far as complain).  From a declarative debugging
perspective the exit ports are exactly the ones corresponding to the
nodes of the proof tree (the tree you want to use for debugging wrong
answers).  If you want to debug my successively narrowing the search
space using the standard four ports you get to a call port and skip to the
corresponding exit port.  If it is correct then 'creep' to the next
call.  If it is not correct you want to 'redo' to get back to the call
port then 'creep' to get to the first call within that procedure (the
first child) and continue as above.

I have always thought that NU-Prolog spypoints were buggy in that they
miss ports I really want to see.  Maybe its just a "feature", like
Quintus.

	lee



More information about the developers mailing list