Abstract
Lazy functional languages have non-strict semantics and are purely declarative, i.e. they support the notion of referential transparency and are devoid of side effects. Traditional debugging techniques are, however, not suited for lazy functional languages since computations generally do not take place in the order one might expect. Since algorithmic debugging allows the user to concentrate on the declarative aspects of program semantics, and will semi-automatically find functions containing bugs, we propose to use this technique for debugging lazy functional programs. Our earlier work showed that this is a promising approach. However, the current version of our debugger has severe implementational problems, e.g. too large trace size and too many questions asked. This paper suggests a number of techniques for overcoming these problems, at least partially. The key techniques are immediate strictification and piecemeal tracing.
Preview
Unable to display preview. Download preview PDF.
References
Lennart Augustsson. A compiler for lazy ML. In Proceedings of the 1984 ACM Conference on LISP and Functional Programming, pages 218–227, August 1984.
Lennart Augustsson. Compiling Lazy Functional Languages part II. PhD thesis, Department of Computer Science, Chalmers University of Technology, December 1987.
Lennart Augustsson. Personal communication on the lack of suitable debugging tools for lazy functional languages, November 1991.
Peter Fritzson, Tibor Gyimothy, Mariam Kamkar, and Nahid Shahmehri. Generalized algorithmic debugging and testing. In Proceedings of the 1991 ACM SIGPLAN Conference, pages 317–26, Toronto, Canada, June 1991. A revised version to appear in ACMLOPLAS (Letters of Programming Languages and Systems).
Thomas Johnsson. Efficient compilation of lazy evaluation. In Proceedings of the 1984 ACM SIGPLAN Symposium on Compiler Construction, pages 58–69, June 1984. Proceedings published in SIGPLAN Notices, 19(6).
Thomas Johnsson. Compiling Lazy Functional Languages. PhD thesis, Department of Computer Science, Chalmers University of Technology, February 1987.
Mariam Kamkar. Interprocedural Dynamic Slicing with Applications to Debugging and Testing. PhD thesis. Department of Computer and Information Science, Linköping University, S-581 83, Linköping, Sweden, April 1993.
Mariam Kamkar, Nahid Shahmehri, and Peter Fritzson. Interprocedural dynamic slicing. In M. Bruynooghe and M. Wirsing, editors, Programming Language Implementation and Logic Programming, volume 631 of Lecture Notes in Computer Science, pages 370–384, Leuven, Belgium, August 1992.
Amir Shai Kishon. Theory and Art of Semantics Directed Program Execution Monitoring. PhD thesis, Yale University, May 1992.
Lee Naish. Declarative debugging of lazy functional programs. Research Report 92/6, Department of Computer Science, University of Melbourne, Australia, 1992.
Henrik Nilsson. Freja: A small non-strict, purely functional language. MSc dissertation, Department of Computer Science and Applied Mathematics, Aston University, Birmingham, England, September 1991.
Henrik Nilsson and Peter Fritzson. Algorithmic debugging for lazy functional languages. In M. Bruynooghe and M. Wirsing, editors, Programming Language Implementation and Logic Programming, volume 631 of Lecture Notes in Computer Science, pages 385–399, Leuven, Belgium, August 1992.
Simon L. Peyton Jones. The Implementation of Functional Programming Languages. Prentice Hall, 1987.
Rudolph E. Seviora. Knowledge-based program debugging systems. IEEE Software, 4(3):20–32, May 1987.
Nahid Shahmehri. Generalized Algorithmic Debugging. PhD thesis, Department of Computer and Information Science, Linköping University, S-581 83, Linköping, Sweden, 1991.
Ehud Y. Shapiro. Algorithmic Program Debugging. MIT Press, May 1982.
Robert Sturrock. Debugging systems for lazy functional programming languages. Honours dissertation, Department of Computer Science, University of Melbourne, Australia, November 1992.
David A. Turner. Miranda: A non-strict functional language with polymorphic types. In Proceedings of the IFIP International Conference on Functional Programming Languages and Computer Architecture, FPCA'85, number 201 in Lecture Notes in Computer Science, Nancy, 1985.
Mark Weiser. Programmers use slices when debugging. Communications of the ACM, 25(7):446–452, July 1982.
Mark Weiser. Program slicing. IEEE Transactions on Software Engineering, 10(4):352–357, July 1984.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1993 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Nilsson, H., Fritzson, P. (1993). Lazy algorithmic debugging: Ideas for practical implementation. 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/BFb0019405
Download citation
DOI: https://doi.org/10.1007/BFb0019405
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