[mercury-users] [petdr at miscrit.be: Report on the ICFP 2000 prog contest]

Mark Anthony BROWN dougl at cs.mu.OZ.AU
Wed Sep 6 18:46:57 AEDT 2000


schachte at cs.mu.OZ.AU writes:
> On  6 Sep, David Overton wrote:
> 
> >> Anyway, how did you try to debug it?  I would have thought the
> >> declarative debugger would have pinpointed it very quickly.
> > 
> > We didn't use the declarative debugger
> 
> Out of curiosity, why not?
> 

I'm not completely sure, since I wasn't there at the time.  But I think
we weren't generally using mdb due to a seg fault in mdb which we
were too busy to investigate at the time.  So using the declarative
debugger would have been a bit hard ;-).

In any case, I would have recommended that it not yet be used for a
critical project with less than 72 hours until the deadline.  The main
reason for this is that it has not been extensively tested (nowhere near
as much as mdb, anyway).  Debuggers in general have very high requirements
in terms of reliability; programmers who use them are expecting to see
bugs in their own code, so if they see something anomalous they are
unlikely to suspect that the debugger is at fault.  Misleading programmers
in this way can cost hours, and since declarative debuggers work at a
higher level of abstraction, the potential to mislead is probably even
greater than for imperative debuggers.

Having said that, I agree that a declarative debugger would be very
useful to diagnose the sort of bugs that can get past the determinism
system, such as incorrect failures in semidet code, and incorrect
exceptions in any sort of code.  In fact, this is the main reason why
I have been keen to implement declarative debugging of exceptions,
despite this being a relatively new part of the language.  Of the "real
world" bugs I have diagnosed with the debugger (mainly in the debugger
itself), more than half have been unexpected exceptions.  In cases
like the bug in the ray tracer, which was incorrect failure in semidet
code, I wholeheartedly recommend using the techniques of declarative
debugging, even if it has to be done manually as David mentioned.

The ray tracer bug will make a good case study of the declarative
debugger.  I'll let this list know how it goes, once I get mdb to work
properly.

Cheers,
Mark.

--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list