Debugging Mercury Programs
Ralph Becket
rwab1 at cam.sri.com
Wed Oct 22 01:10:28 AEST 1997
While the Mercury compiler does seem to produce the most helpful error
messages in the world, the absense of a debugger and `tracing' IO
in nondeterministic predicates would seem to make finding logical bugs
very difficult.
I was wondering what the Mercury developers and people developing
applications using Mercury currently use when debugging. Is
--generate-prolog sicstus
sufficient for the task (I haven't tried it, but suspect that a
good deal of name mangling and code reordering occurs twixt Mercury
and Prolog). On the other hand, do people use some nasty impure
library for tracing IO in non-deterministic predicates, something of
the form
:- pred trc_msg(string).
:- mode trc_msg(in) is semidet.
:- pragma c_code(
trc_msg(Msg::in),
may_call_mercury,
"{
printf("\ntrc_msg: %s\n", Msg);
}").
Of course, I may be missing something obvious here... While I'm on
the subject, is anybody working on a Mercury level debugger?
Cheers,
Ralph
--
Ralph Becket | rwab1 at cam.sri.com | http://www.cam.sri.com/people/becket.html
More information about the users
mailing list