Abstract
A computation tree of a program execution describes computations of functions and their dependencies. A computation tree describes how a program works and is at the heart of algorithmic debugging. To generate a computation tree, existing algorithmic debuggers either use a complex implementation or yield a less informative approximation. We present a method for lazy functional languages that requires only a simple tracing library to generate a detailed computation tree. With our algorithmic debugger a programmer can debug any Haskell program by only importing our library and annotating suspected functions.
Supplemental Material
Available for Download
This archive contains a virtual machine image with executable semantics, the Hoed-pure and Hoed-cc debuggers and examples of defect programs.
- B. Braßel and H. Siegel. Debugging lazy functional programs by asking the oracle. In Implementation and Application of Functional Languages, 19th International Workshop, IFL 2007, Freiburg, Germany, September 27-29, 2007. Revised Selected Papers, LNCS 5083, pages 183–200, 2008.Google Scholar
- R. Caballero, C. Hermanns, and H. Kuchen. Algorithmic debugging of Java programs. Electronic Notes in Theoretical Computer Science, 177:75–89, 2007. Google ScholarDigital Library
- R. Caballero, F. J. L´opez-Fraguas, and M. Rodr´ıguez-Artalejo. Theoretical foundations for the declarative debugging of lazy functional logic programs. In Functional and Logic Programming, LNCS 2024, pages 170–184, 2001. Google ScholarDigital Library
- R. Caballero, E. Martin-Martin, A. Riesco, and S. Tamarit. EDD: A Declarative Debugger for Sequential Erlang Programs. In Tools and Algorithms for the Construction and Analysis of Systems, pages 581–586. Springer, 2014.Google Scholar
- O. Chitil and T. Davie. Comprehending finite maps for algorithmic debugging of higher-order functional programs. In Proceedings of the International Conference on Principles and Practice of Declarative Programming, PPDP 2008, pages 205–216, 2008. Google ScholarDigital Library
- O. Chitil and Y. Luo. Structure and properties of traces for functional programs. Electronic Notes in Theoretical Computer Science, 176(1):39–63, 2007. Google ScholarDigital Library
- O. Chitil, C. Runciman, and M. Wallace. Freja, Hat and Hood — a comparative evaluation of three systems for tracing and debugging lazy functional programs. In Implementation of Functional Languages, LNCS 2011. 2001. Google ScholarDigital Library
- O. Chitil, C. Runciman, and M. Wallace. Transforming Haskell for tracing. In Implementation of Functional Languages, LNCS 2670, pages 165–181. 2003. Google ScholarDigital Library
- K. Claessen and J. Hughes. QuickCheck: A Lightweight Tool for Random Testing of Haskell Programs. In Proceedings of the Fifth ACM SIGPLAN International Conference on Functional Programming, ICFP 2000, pages 268–279, 2000. Google ScholarDigital Library
- Don Stewart. XMonad. http://xmonad.org, 2015.Google Scholar
- M. Faddegon and O. Chitil. Type Generic Observing. In Trends in Functional Programming, LNCS 8843. Springer, 2014.Google Scholar
- M. Faddegon and O. Chitil. Algorithmic Debugging of Real-World Haskell Programs: Deriving Dependencies from the Cost Centre Stack. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2015, pages 33–42, 2015. Google ScholarDigital Library
- P. Fritzson, N. Shahmehri, M. Kamkar, and T. Gyimothy. Generalized algorithmic debugging and testing. ACM Lett. Program. Lang. Syst., 1(4):303–322, Dec. 1992. Google ScholarDigital Library
- Game Creation Society, Carnegie Mellon. Raincat. http: //www.gamecreation.org/game/raincat, 2014.Google Scholar
- A. Gill. Debugging Haskell by Observing Intermediate Data Structures. Electronic Notes in Theoretical Computer Science, 41, 2000. ACM SIGPLAN Workshop on Haskell.Google Scholar
- D. Insa and J. Silva. An algorithmic debugger for Java. In Software Maintenance (ICSM), 2010 IEEE International Conference on, pages 1–6. IEEE, 2010. Google ScholarDigital Library
- J. Launchbury. A natural semantics for lazy evaluation. In Proceedings of the symposium on Principles of programming languages, POPL 1993, pages 144–154, 1993. Google ScholarDigital Library
- L. Naish. A declarative debugging scheme. Journal of Functional and Logic Programming, 3, 1997.Google Scholar
- L. Naish. A three-valued declarative debugging scheme. In Computer Science Conference, 2000. ACSC 2000. 23rd Australasian, pages 166–173, 2000.Google Scholar
- H. Nilsson. Declarative debugging for lazy functional languages. PhD thesis, Linköpings universitet, 1998.Google Scholar
- H. Nilsson and P. Fritzson. Algorithmic debugging for lazy functional languages. In M. Bruynooghe and M. Wirsing, editors, Programming Language Implementation and Logic Programming, PLILP ’92, pages 385–399. LNCS 631, 1992. Google ScholarDigital Library
- H. Nilsson and J. Sparud. The evaluation dependence tree as a basis for lazy functional debugging. Automated Software Engineering, 4(2):121–150, 1997. Google ScholarDigital Library
- Olaf Chitil. FPretty. http://hackage.haskell.org/ package/FPretty, 2012.Google Scholar
- B. Pope. Declarative Debugging with Buddha. In Advanced Functional Programming, LNCS 3622, pages 273–308, 2005. Google ScholarDigital Library
- B. Pope. A Declarative Debugger for Haskell. PhD thesis, The University of Melbourne, Australia, 2006.Google Scholar
- E. Y. Shapiro. Algorithmic program debugging. MIT press, 1983. Google ScholarDigital Library
- J. Silva. A comparative Study of Algorithmic Debugging Strategies. In Logic-Based Program Synthesis and Transformation, LNCS 4407, pages 143–159, 2007. Google ScholarDigital Library
- J. Sparud and C. Runciman. Tracing lazy functional computations using redex trails. In Programming Languages: Implementations, Logics, and Programs, PLILP ’97, pages 291– 308. LNCS 1292, 1997. Google ScholarDigital Library
- P. Wadler. Why No One Uses Functional Languages. SIGPLAN Not., 33(8):23–27, 1998. Google ScholarDigital Library
- M. Wallace, O. Chitil, T. Brehm, and C. Runciman. Multipleview tracing for Haskell: a new Hat. In Proceedings of the 2001 ACM SIGPLAN Haskell Workshop, 2001.Google Scholar
- A. Zeller. Why Programs Fail, 2nd Edition. Morgan Kaufmann, 2009.Google Scholar
- T. Zielonka and the GHC Team. http://www.haskell. org/ghc/survey2005-summary, 2005.Google Scholar
Index Terms
- Lightweight computation tree tracing for lazy functional languages
Recommendations
Lightweight computation tree tracing for lazy functional languages
PLDI '16: Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and ImplementationA computation tree of a program execution describes computations of functions and their dependencies. A computation tree describes how a program works and is at the heart of algorithmic debugging. To generate a computation tree, existing algorithmic ...
Algorithmic debugging of real-world haskell programs: deriving dependencies from the cost centre stack
PLDI '15: Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and ImplementationExisting algorithmic debuggers for Haskell require a transformation of all modules in a program, even libraries that the user does not want to debug and which may use language features not supported by the debugger. This is a pity, because a promising ...
Algorithmic debugging of real-world haskell programs: deriving dependencies from the cost centre stack
PLDI '15Existing algorithmic debuggers for Haskell require a transformation of all modules in a program, even libraries that the user does not want to debug and which may use language features not supported by the debugger. This is a pity, because a promising ...
Comments