Abstract
Programmers using imperative languages have a number of well-established debugging tools available to them; functional programmers have few, if any, tools available. Many of the tools and techniques developed for debugging functional programs are based on those for imperative programming and lack a theoretical basis relevant to functional programming. In addition, the techniques used are typically very time-consuming. A theoretical foundation on which to base the study of errors and debugging in functional programming is presented in this paper. Using this theoretical foundation, a set of program transformation schemes has been developed which facilitate the location of the type of error which results in an evaluation-time error message and the termination of evaluation. A brief description of the practical experience obtained using the tool is also presented.
The author is supported by a grant from the Science and Engineering Research Council of Great Britain.
Preview
Unable to display preview. Download preview PDF.
References
L. Augustsson. A compiler for lazy ML. In Proceedings of the ACM Symposium on Lisp and Functional Programming, Austin, pages 218–27, August 1984.
R. Garigliano, R.G. Morgan, and M.H. Smith. LOLITA: Progress report 1. Technical Report 12/92, Artificial Intelligence Systems Research Group, School of Engineering and Computer Science, University of Durham, Science Laboratories, South Road, Durham DH1 3LE, United Kingdom, 1992.
S. Kamin. A debugging environment for functional programming in Centaur. Technical report, INRIA Sophia-Antipolis, 1990.
L. Naish. Declarative debugging of lazy functional programs (draft). Technical Report 92/6, Department of Computer Science, University of Melbourne, Parkville, Melbourne, Victoria 3052, Australia, May 1992.
H. Nilsson and P. Fritzson. Algorithmic debugging for lazy functional languages. In M. Bruynooghe and M. Wirsing, editors, Proceedings of the Fourth International Symposium on Programming Language Implementation and Logic Programming, number 631 in Lecture Notes in Computer Science, pages 385–399, Leuven, Belgium, August 1992. Springer-Verlag.
J.T. O'Donnell and C.V. Hall. Debugging in applicative languages. Lisp and Symbolic Computation, 1(2):113–145, 1988.
E.Y. Shapiro. Algorithmic Program Debugging. ACM Distinguished Dissertations. MIT Press, May 1982.
R.M. Snyder. Lazy debugging of lazy functional programs. New Generation Computing, 8(2):138–161, 1990.
I. Toyn and C. Runciman. Adapting combinator and SECD machines to display snapshots of functional computations. New Generation Computing, 4(4):339–363, 1986.
D.A. Turner. Miranda: a non-strict functional language with polymorphic types. In Jean-Pierre Jouannaud, editor, Proceedings of the IFIP International Conference on Functional Programming Languages and Computer Architecture, number 201 in Lecture Notes in Computer Science, pages 1–16, Nancy, France, 1985. Springer-Verlag.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1993 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Hazan, J.E., Morgan, R.G. (1993). The location of errors in functional programs. In: Fritzson, P.A. (eds) Automated and Algorithmic Debugging. AADEBUG 1993. Lecture Notes in Computer Science, vol 749. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0019406
Download citation
DOI: https://doi.org/10.1007/BFb0019406
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-57417-0
Online ISBN: 978-3-540-48141-6
eBook Packages: Springer Book Archive