Skip to main content

Algorithmic debugging for lazy functional languages

  • Conference paper
  • First Online:
Programming Language Implementation and Logic Programming (PLILP 1992)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 631))

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. In this paper we present an algorithmic debugger for a lazy functional language and some experience in using it. Because of the non-strict semantics of lazy functional languages, arguments to functions are in general partially evaluated expressions. The user is, however, usually more concerned with the values that these expressions represent. We address this problem by providing the user with a strictified view of the execution trace whenever possible.

This work is supported by the Swedish Board for Technical Development, NUTEK.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Lennart Augustsson. A compiler for Lazy ML, in Proceedings 1984 ACM Conference on LISP and Functional Programming, pp. 218–227, August 1984.

    Google Scholar 

  2. Lennart Augustsson. Personal communication on the lack of suitable debugging tools for lazy functional languages, November 1991.

    Google Scholar 

  3. Wlodek Drabent, Simin Nadjm-Tehrani, Jan Maluszynski. The Use of Assertions in Algorithmic Debugging, in Proceedings of the FGCS Conference, pp. 573–581, Tokyo, Japan, 1988.

    Google Scholar 

  4. Peter Fritzson, Tibor Gyimothy, Mariam Kamkar, and Nahid Shahmehri. Generalized Algorithmic Debugging and Testing, in Proceedings of the ACM SIGPLAN'91, pp. 317–326, Toronto, Ontario, Canada, June 1991.

    Google Scholar 

  5. Wolfgang Henhapl, Stefan Kaes, Gregor Snelting. Utilizing Fifth Generation Technology in Software Development Tools, report PI-R3/91, Technische Hochschule Darmstadt, March 1991.

    Google Scholar 

  6. Thomas Johnsson. Efficient Compilation of Lazy Evaluation, in Proceedings of the ACM SIGPLAN 1984 Symposium on Compiler Construction, SIGPLAN Notices 19(6), pp. 58–69, June 1984.

    Google Scholar 

  7. Lee Naish. Declarative debugging of lazy functional programs, report 92/6, Department of Computer Science, University of Melbourne, Australia, 1992.

    Google Scholar 

  8. Henrik Nilsson. Freja: a small, non-strict, purely functional language, MSc dissertation, Department of Computer Science and Applied Mathematics, Aston University, Birmingham, England, 1991.

    Google Scholar 

  9. Simon L. Peyton Jones. The Implementation of Functional Programming Languages, Prentice Hall, 1987.

    Google Scholar 

  10. Rudolph E. Seviora. Knowledge-Based Program Debugging Systems, in IEEE Software 4(3), pp. 20–32, May 1987.

    Google Scholar 

  11. Nahid Shahmehri. Generalized Algorithmic Debugging, PhD thesis, Department of Computer and Information Science, Linköping University, Linköping, Sweden, December 1991.

    Google Scholar 

  12. E. Y. Shapiro. Algorithmic Program Debugging, MIT Press, May 1982.

    Google Scholar 

  13. 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, Nancy, Springer Lecture Notes in Computer Science, LNCS 201, 1985.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Maurice Bruynooghe Martin Wirsing

Rights and permissions

Reprints and permissions

Copyright information

© 1992 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Nilsson, H., Fritzson, P. (1992). Algorithmic debugging for lazy functional languages. In: Bruynooghe, M., Wirsing, M. (eds) Programming Language Implementation and Logic Programming. PLILP 1992. Lecture Notes in Computer Science, vol 631. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-55844-6_149

Download citation

  • DOI: https://doi.org/10.1007/3-540-55844-6_149

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-55844-6

  • Online ISBN: 978-3-540-47297-1

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics