Skip to main content
Log in

Debugging in applicative languages

  • Published:
LISP and Symbolic Computation

Abstract

Applicative programming languages have several properties that appear to make debugging difficult. First, the absence of assignment statements complicates the notion of changing a program while debugging. Second, the absence of imperative input and output makes it harder to obtain information about what the program is doing. Third, the presence of lazy evaluation prevents the user from knowing much about the order in which events occur. Some solutions to these problems involve nonapplicative extensions to the language. Fortunately, the same features of applicative languages that cause problems for traditional debugging also support an idiomatic applicative style of programming, and effective debugging techniques can be implemented using that style. This paper shows how to implement tracing and interactive debugging tools in a purely applicative style. This approach is more flexible, extensive and portable than debugging tools that require modification to the language implementation.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

Abbreviations

D.1.1[Applicative (Functional) Programming] :

Debugging techniques

D.2.5[Testing and Debugging] :

Tracing, Debugging aids

D.3.2[Language Classifications] :

Applicative languages

References

  1. Delisle, N.M., Menicosy, D.E., and Schwartz, M.D. Viewing a programming environment as a single tool. Proceedings of the ACM SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments, April 1984, pp. 49–56.

  2. Friedman, D.P., and Wise, D.S. CONS should not evaluate its arguments. InAutomata, Languages and Programming S. Michaelson, and R. Milner, (Eds.). Edinburgh Univ. Press, Edinburgh, 1976, pp. 257–284.

    Google Scholar 

  3. Friedman, D.P., and Wise, D.S. Unbounded computational structures.Software Practice and Experience 8 (1976) 407–416.

    Google Scholar 

  4. Friedman, D.P., and Wise, D.S. An indeterminate constructor for applicative programming. Seventh Annual Symposium on Principles of Programming Languages, January 1980, pp. 243–250.

  5. Hall, C.V., and O'Donnell, J.T. Debugging in a side effect free programming environment. Proceedings, 1986 SIGPLAN Symposium on Programming Languages and Programming Environments, June 1985, 60–68.

  6. Hughes, J. Why functional programming matters? Report 16, Programming Methodology Group, Dept. of Computer Science, University of Goteborg, Sweden, Nov. 1984.

    Google Scholar 

  7. Johnson, D. Daisy language manual. Computer Science Department, Indiana University, Bloomington, 1987 (in progress).

    Google Scholar 

  8. Kieburtz, R.B. A proposal for interactive debugging of ML programs. Proceedings of the Workshop on Implementation of Functional Languages, Report 17, Programming Methodology Group, Chalmers University of Technology, Goteborg, Sweden, 1985, pp. 151–155.

    Google Scholar 

  9. Kohlstaedt, A.T. Daisy 1.0 reference manual. Technical Report 116, Computer Science Department, Indiana University, Bloomington, 1981.

    Google Scholar 

  10. Milner, R. How ML evolved.Polymorphism, the ML/LCF/Hope Newsletter L. Cardelli and D. Mac-Queen (Eds.),1, 1 (Jan. 1983) 1–6.

  11. Morris, J.H., Schmidt, E., and Wadler, P. Experience with an applicative string processing language. Conference Record of the Seventh Annual Symposium on Principles of Programming Languages, January 1980, pp. 32–46.

  12. O'Donnell, J.T. Dialogues: A basis for constructing programming environments. Proceedings of the ACM SIGPLAN 85 Symposium on Programming Languages and Programming Environments, June 1985, 19–27.

  13. O'Donnell, J.T. Hardware description with recursion equations.Proceedings of the IFIP 8th International Symposium on Computer Hardware Description Languages and Their Applications. North-Holland, Amsterdam, Apr. 1987, 363–382.

  14. O'Donnell, J.T. An applicative programming environment. Computer Science Dept., Indiana University, Bloomington (in progress).

  15. Peyton Jones, S.L. Directions in functional programming research. InDistributed Computing Systems Programme D.A. Duce, (Ed.). Peter Peregrinus, London, 1984, pp. 221–245.

    Google Scholar 

  16. Shapiro, E.Y.Algorithmic Program Debugging The MIT Press, Cambridge, MA, 1983.

    Google Scholar 

  17. Sterling, L., and Shapiro, E.The Art of Prolog, Advanced Programming Techniques The MIT Press, Cambridge, MA, 1986.

    Google Scholar 

  18. Stoye, W.The Implementation of Functional Languages Using Custom Hardware Computer Laboratory, Cambridge University, Cambridge, Dec. 1985.

    Google Scholar 

  19. Toyn, I., and Runciman, C. Adapting combinator and SECD machines to display snapshots of functional computations.New Generation Computing 4 (1986) 339–363.

    Google Scholar 

  20. Turner, D.A. A new implementation technique for applicative languages.Software—Practice and Experience 9 (1979) 31–49.

    Google Scholar 

  21. Wertz, H. An integrated Lisp programming environment. Proceedings of the ACM SIGSOFT/SIGPLAN Software Engineering Symposium on High-Level Debugging, 1983, pp. 91–95.

  22. Wetherell, C.S. Error data values in the data-flow language VAL.ACM Transactions on Programming Languages and Systems 4, 2 (Apr. 1982) 226–238.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Additional information

D.2.6[Programming Environments];

Rights and permissions

Reprints and permissions

About this article

Cite this article

O'Donnell, J.T., Hall, C.V. Debugging in applicative languages. Lisp and Symbolic Computation 1, 113–145 (1988). https://doi.org/10.1007/BF01806168

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF01806168

Keywords

Navigation