Academia.eduAcademia.edu

Outline

Lazy call-by-value evaluation

2007, Sigplan Notices

https://doi.org/10.1145/1291220.1291193

Abstract

Designing debugging tools for lazy functional programming languages is a complex task which is often solved by expensive tracing of lazy computations. We present a new approach in which the information collected as a trace is reduced considerably (kilobytes instead of megabytes). The idea is to collect a kind of step information for a call-by-value interpreter, which can then efficiently reconstruct the computation for debugging/viewing tools, like declarative debugging. We show the correctness of the approach, discuss a proof-of-concept implementation with a declarative debugger as back end and present some benchmarks comparing our new approach with the Haskell debugger Hat.

References (14)

  1. B. Braßel, S. Fischer, M. Hanus, F. Huch, and G. Vidal. Lazy Call-By-Value Evaluation. Technical report, CAU Kiel, 2007.
  2. A. Gill. Debugging Haskell by Observing Intermediate Data Structures. In Proc. of the 4th Haskell Workshop. Technical report of the University of Nottingham, 2000.
  3. J. Launchbury. A Natural Semantics for Lazy Evaluation. In Proc. of the ACM Symp. on Principles of Programming Languages (POPL'93), pages 144-154. ACM Press, 1993.
  4. H. Nilsson. Tracing Piece by Piece: Affordable Debugging for Lazy Func- tional Languages. In Proc. of the 1999 Int'l Conf. on Functional Pro- gramming (ICFP'99), pages 36-47. ACM Press, 1999.
  5. H. Nilsson. How to look busy while being as lazy as ever: the implementa- tion of a lazy functional debugger. Journal of Functional Programming, 11(6):629-671, 2001.
  6. H. Nilsson and J. Sparud. The Evaluation Dependence Tree as a Basis for Lazy Functional Debugging. Automated Software Engineering, 4(2): 121-150, 1997.
  7. S.L. Peyton Jones, editor. Haskell 98 Language and Libraries-The Revised Report. Cambridge University Press, 2003.
  8. B. Pope. Declarative Debugging with Buddha. In V. Vene and T. Uustalu, editors, Advanced Functional Programming, 5th International School, AFP 2004, volume 3622 of Lecture Notes in Computer Science, pages 273-308. Springer Verlag, September 2005. ISBN 3-540-28540-7.
  9. B. Pope and Lee Naish. Practical aspects of declarative debugging in Haskell-98. In Fifth ACM SIGPLAN Conference on Principles and Practice of Declarative Programming, pages 230-240, 2003. ISBN:1- 58113-705-2.
  10. P.M. Sansom and S.L. Peyton Jones. Formally Based Profiling for Higher- Order Functional Languages. ACM Transactions on Programming Lan- guages and Systems, 19(2):334-385, 1997.
  11. E. Shapiro. Algorithmic Program Debugging. MIT Press, Cambridge, Massachusetts, 1983.
  12. J. Sparud and C. Runciman. Complete and Partial Redex Trails of Func- tional Computations. In Proc. of the 9th Int'l Workshop on the Imple- mentation of Functional Languages (IFL'97), pages 160-177. Springer LNCS 1467, 1997a.
  13. J. Sparud and C. Runciman. Tracing Lazy Functional Computations Us- ing Redex Trails. In Proc. of the 9th Int'l Symp. on Programming Lan- guages, Implementations, Logics and Programs (PLILP'97), pages 291- 308. Springer LNCS 1292, 1997b.
  14. M. Wallace, O. Chitil, T. Brehm, and C. Runciman. Multiple-View Tracing for Haskell: a New Hat. In Proc. of the 2001 ACM SIGPLAN Haskell Workshop. Universiteit Utrecht UU-CS-2001-23, 2001.