Tracing lazy functional computations using redex trails
We describe the design and implementation of a system for tracing computations in a lazy functional language. The basis of our tracing method is a program transformation carried out by the compiler: transformed programs compute the same values as the original, but embedded in functional data structures that also include redex trails showing how the values were obtained. A special-purpose display program enables detailed but selective exploration of the redex trails, with cross-links to the source program.
Keywordsdebugging graph reduction Haskell program transformation
Unable to display preview. Download preview PDF.
- [HM93]Jonathan E. Hazan and Richard G. Morgan. The location of errors in functional programs. In Peter Pritzson, editor, Automated and Algorithmic Debugging, volume 749 of Lecture Notes in Computer Science, pages 135–152, Linköping, Sweden, May 1993.Google Scholar
- [Jon92]Richard Jones. Tail recursion without space leaks. Journal of Functional Programming, 2(1):73–79, January 1992.Google Scholar
- [KHC91]A. Kishon, P. Hudak, and C. Consel. Monitoring semantics: a formal frame-work for specifying, implementing and reasoning about execution monitors. In ACM Conference on Programming Language Design and Implementation (PLDI'91), pages 338–52, June 1991.Google Scholar
- [NB95]Lee Naish and Tim Barbour. Towards a portable lazy functional declarative debugger. Technical Report 95/27, Department of Computer Science, University of Melbourne, Australia, 1995.Google Scholar
- [NF94]H. Nilsson and P. Fritzson. Algorithmic debugging for lazy functional languages. Journal of Functional Programming, 4(3), 1994.Google Scholar
- [NS97]Henrik Nilsson and Jan Sparud. The evaluation dependence tree as a basis for lazy functional debugging. Journal of Automated Software Engineering, 4(2):152–205, April 1997.Google Scholar
- [Par93]W. Partain. The nofib benchmark suite of Haskell programs. In J. Launchbury and P. Sansom, editors, Proc. 1992 Glasgow Workshop on Functional Programming, pages 195–202. Springer Verlag, Workshops in Computing, 1993.Google Scholar
- [Röj95]N. Röjemo. Highlights from nhc-a space efficient haskell compiler. In Proc. 7th Intl. Conf. on Functional Programming Languages and Computer Architecture (FPCA'95), pages 282–292, La Jolla, June 1995. ACM Press.Google Scholar
- [Sha82]Ehud Y. Shapiro. Algorithmic Program Debugging. MIT Press, May 1982.Google Scholar
- [Spa96]Jan Sparud. A transformational approach to debugging lazy functional programs. Licentiate Thesis, Department of Computing Science, Chalmers University of Technology, S-412 96, Göteborg, Sweden, February 1996.Google Scholar
- [TA90]A. P. Tolmach and A. W. Appel. Debugging Standard ML without reverse engineering. In Proc. ACM cord. on Lisp and functional programming. ACM Press, 1990.Google Scholar
- [WR97]M. Wallace and C. Runciman. Heap compression and binary I/O in Haskell. In Proc. 2nd ACM SIGPLAN Workshop on Haskell, Amsterdam, June 1997.Google Scholar