Formalizing the Debugging Process in Haskell
- 363 Downloads
Due to its absence of side effects, it is usually claimed that reasoning about functional programs is simpler than reasoning about their imperative counterparts. Unfortunately, due to the absence of practical debuggers, finding bugs in lazy functional languages has been much more complex until quite recently. One of the easiest to use Haskell debuggers is Hood, whose behavior is based on the concept of observation of intermediate data structures. However, it can be hard to understand how it works when dealing with complex situations.
In this paper, we introduce debugging facilities in the STG abstract machine. Our goal is to obtain debugging information as close to the one obtained by the Hood debugger as possible. By extending the STG abstract machine, we do not only provide a formal framework to the debugging process, but also an alternative method to implement debuggers.
KeywordsFunctional programming debugging abstract machines
Unable to display preview. Download preview PDF.
- 2.Encina, A., Llana, L., Rubio, F.: Formalizing the debugging process in Haskell, extended version (2005), http://dalila.sip.ucm.es/miembros/albertoe/
- 4.Encina, A., Peña, R.: Formally deriving an STG machine. In: Principles and Practice of Declarative Programming (PPDP 2003), pp. 102–112. ACM, New York (2003)Google Scholar
- 6.Gill, A.: Debugging Haskell by observing intermediate data structures. In: 4th Haskell Workshop. Technical Report of the University of Nottingham (2000)Google Scholar
- 7.Gill, A.: Hood homepage (2005), http://www.haskell.org/hood
- 8.Hidalgo-Herrero, M., Ortega-Mallén, Y.: Continuation semantics for parallel Haskell dialects. In: Riis Nielson, H. (ed.) ESOP 1996. LNCS, vol. 1058, pp. 303–321. Springer, Heidelberg (1996)Google Scholar
- 10.Nilsson, H.: Declarative debugging for lazy functional languages. PhD thesis, Dpt. Computer and Information Science, Linköping University, Sweden (1998)Google Scholar
- 13.Peyton Jones, S., Hughes, J. (eds.): Report on the Programming Language Haskell 1998 (February 1999), http://www.haskell.org
- 14.Pope, B., Naish, L.: Practical aspects of declarative debugging in Haskell 98. In: Principles and Practice of Declarative Programming (PPDP 2003), pp. 230–240. ACM, New York (2003)Google Scholar
- 15.Reinke, C.: GHood — graphical visualization and animation of Haskell object observations. In: 5th Haskell Workshop. ENTCS, vol. 59. Elsevier Science, Amsterdam (2001)Google Scholar
- 18.Wallace, M., Chitil, O., Brehm, T., Runciman, C.: Multipleview tracing for Haskell: a new Hat. In: 5th Haskell Workshop, pp. 151–170 (2001)Google Scholar