[m-users.] Micheal Hendricks: https://www.youtube.com/watch?v=G_eYTctGZw8
Mark Brown
mark at mercurylang.org
Mon Sep 22 21:38:04 AEST 2014
On Mon, Sep 22, 2014 at 2:39 PM, Peter Schachte <pschachte at gmail.com> wrote:
> It's ironic that he introduces Mercury to talk about declarative
> debugging, and then says he doesn't know if that's been done for Prolog,
> when the first declarative debugger was written in and for Prolog (in
> 1982!). Sad that it's not been incorporated as a standard Prolog feature.
Shapiro's debugger was for pure Prolog, so was not generally
applicable in practice (but it was important in many ways, and the
inspiration for what followed).
Miguel Calejo makes a relevant point, a decade later [1]:
Historically, logic programming has adopted a certain style of
programming input/output interaction, typically through the use
of destructible (i.e., nonbacktrackable) actions on character
streams, in the middle of normal logical deductions - side-effects.
Although current programming practice is starting to avoid this
approach, separating as clearly as possible interface from purely
deductive code, the traditional approach is still common. Even
the current drafts of the future Prolog standard continue to ignore
this distinction, relegating the issue to each implementation.
To declaratively debug programs that do I/O, you need declarative I/O.
Michael's talk mentioned the importance of being able to retry
previous computations in a debugger. It's important in an automated
debugger too. Zoltan published a practical solution for retrying
across code that performs I/O, in 2003 [2]. I don't know if this has
since been done for Prolog.
Cheers,
Mark.
[1] http://www.declarativa.com/people/mc/mcStuff/CalejoPhDThesis1992.pdf
[2] https://mercurylang.org/documentation/papers.html#aadebug03-paper
More information about the users
mailing list