Direct Interpretation of Functional Programs for Debugging

John Whitington
Tom Ridge

We make another assault on the longstanding problem of debugging. After exploring why debuggers are not used as widely as one might expect, especially in functional programming environments, we define the characteristics of a debugger which make it usable and thus widely used. We present initial work towards a new debugger for OCaml which operates by direct interpretation of the program source, allowing the printing out of individual steps of the program's evaluation. We present OCamli, a standalone interpreter, and propose a mechanism by which the interpreter could be integrated into compiled executables, allowing part of a program to be interpreted in the same fashion as OCamli whilst the rest of the program runs natively. We show how such a mechanism might create a source-level debugging system that has the characteristics of a usable debugger (such as being independent of its environment) and so may eventually be expected to be suitable for widespread adoption.

In Sam Lindley and Gabriel Scherer: Proceedings ML Family / OCaml Users and Developers workshops (ML 2017), Oxford, UK, 7th September 2017, Electronic Proceedings in Theoretical Computer Science 294, pp. 41–73.
Published: 16th May 2019.

ArXived at: http://dx.doi.org/10.4204/EPTCS.294.3 bibtex PDF
References in reconstructed bibtex, XML and HTML format (approximated).
Comments and questions to: eptcs@eptcs.org
For website issues: webmaster@eptcs.org