[comp.lang.prolog] better than 4-port debugger

jim@hydra.maths.unsw.oz.au (06/24/91)

IMHO, four-port debugging may be fine as an underlying model,
but is bad as a view of that model. recently, i was doing some
partial evaluation work and the strutures i was generating filled
several lines on my 4-port debugger. what i would have prefered
is a debugger ala Smalltalk where the call history is on a
click and point list in a window and clicking on item in that
list pops up another window with all the arguments listed in another
list. clicking on any one argument would print it to a third window.

sound tricky, right? actually, its wonderfully easy to use. the
debugger was one of the main reasons I switched from KEE on a LISP
machine to Smalltalk/V under DOS. I had all the debugging productivity
and none of the LISP machine overheads.

tim menzies.   (timm@spectrum.cs.unsw.oz.au)

ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) (06/24/91)

In article <1793@usage.csd.unsw.oz.au>, jim@hydra.maths.unsw.oz.au writes:
> IMHO, four-port debugging may be fine as an underlying model,
> but is bad as a view of that model. recently, i was doing some
> partial evaluation work and the strutures i was generating filled
> several lines on my 4-port debugger.

That is *precisely* what the print/1 and portray/1 predicates were
invented for.  The (tty interface to) the four-port debugger *must*
call print/1 to display the goals.  You get to define portray/1 to
do whatever level of abbreviation you like.  When I say that print/1
and portray/1 were invented for this, I am writing the literal
truth.  Chris Mellish was working on a program written in DEC-10
Prolog where the goals (even when acyclic) tended to take up a whole
screen.  print/1 and portray/1 were added so that he could abbreviate
the output.  The 'w' command and its relatives in the tty interface
to the 4-port debugger let you over-ride that.

> what i would have prefered
> is a debugger ala Smalltalk where the call history is on a
> click and point list in a window and clicking on item in that
> list pops up another window with all the arguments listed in another
> list. clicking on any one argument would print it to a third window.

> sound tricky, right?
No.
I'm glad that there is a tty interface to some Prolog debuggers,
because I'm using a 24x80 terminal here...  That's not to say that
there shouldn't be additional interfaces.  (

-- 
I agree with Jim Giles about many of the deficiencies of present UNIX.

ksh@ely.cl.cam.ac.uk (Kish Shen) (06/25/91)

Tim Menzies writes (about a 4 port debugger):

>but is bad as a view of that model. recently, i was doing some
>partial evaluation work and the strutures i was generating filled
>several lines on my 4-port debugger. what i would have prefered

Have you tried SICStus' debugger? This is basically the standard 4 port
debugger,
but like Quntus' debugger, if the clause is too large (has subterms which are
nested too deeply or has too many arguments), it is not displayed fully, so the
structures would not occupied many lines. In addition, SICStus allows you to
"navigate" around the structures, i.e. you can request the display of subterms
you are interested in. This seem to provide what I think you want, but without
the nice window interface, and staying within the box model. I certainly
found it
extremely useful, but I am biased (:-)), as I proposed this feature for
SICStus.

--Kish Shen

(ksh@cl.cam.ac.uk)