A Theory of Tracing Pure Functional Programs
Olaf Chitil and Yong Luo
EPSRC grant EP/C516605/1
1 April 2005 - 31 October 2007
Tracing Functional Programs
Tracing enables the programmer to see how different parts of the program
cause a computation to perform its observed input/output actions. Tracing
is used primarily for debugging, that is, for localising the faulty program
part that causes an undesirable observable behaviour.
For declarative languages new tracing methods that are different from, and arguably more powerful than, conventional methods for imperative languages have been developed. These methods take advantage of the purity of declarative languages, that is, explicit data flow and absence of side effects. Functional languages are particularly suitable for these methods, because they have simple and well-studied semantics, and lazy functional languages are the most widely used completely pure programming languages. There now exist several tracing systems for the standard lazy functional language Haskell, demonstrating the practical viability of different tracing methods.
Challenges and Aims
During the development of the Haskell tracer
Hat, which combines the tracing methods of several preceding systems, numerous inconsistencies, anomalies and defects in all existing systems came to light. Experience in using the systems suggests desirable generalisations that are hard to realise. At the root of both problems is that the development of the existing systems was implementation-driven, guided mostly by intuition. There is a surprising lack of theoretical foundations for tracing. To resolve the inconsistencies and enable generalisations, this project aims at establishing a semantical theory of tracing pure functional programs, both eager and lazy, that describes different methods, links information gained from tracing to specific program parts, and establishes the correctness of fault location algorithms.
Relevance
The results of this project will provide the basis for the improvement of existing tracing systems and the construction of new, more powerful tracing systems for declarative languages. All programmers using these systems will profit from the systems' support for the development of correct software. The availability of powerful tracing tools will also strengthen the case for using declarative programming languages more widely.
Talks
- Olaf Chitil: Debugging of Functional Programs
Computer Science Research Colloquium, University of Hertfordshire, UK, 12 March 2008.
Abstract,
Slides Pdf (800 KB).
- Olaf Chitil: Foundations for the Debugging of Functional Programs
Functional Programming in the Afternoon, Credite Suisse, London, UK, 12 February 2008.
Abstract,
Slides Pdf (450 KB).
- Yong Luo: Replacing Unevaluated Parts in the Traces of Functional Programs
International Symposium on Implementation and Application of Functional Languages (IFL 2006), Budapest, Hungary, 6 September 2006.
- Olaf Chitil: Foundations for Tracing Functional Programs and the Correctness of Algorithmic Debugging
Kolloquium des Instituts für Informatik,
Christian-Albrechts-Universität zu Kiel, Germany, 26 April 2006.
Abstract,
Slides Pdf (520 KB).
- Yong Luo: Proving the Correctness of Algorithmic Debugging for Functional Programs
Seventh Symposium on Trends in Functional Programming, TFP 2006, Nottingham, 19 April 2006.
Abstract,
Slides Pdf (130 KB).
- Olaf Chitil: Towards a Theory of Tracing for Functional Programs
Third International Workshop on Term Graph Rewriting, TERMGRAPH 2006, Vienna, 1 April 2006.
Abstract, Slides Pdf (410 KB).
- Olaf Chitil: Debugging and Tracing Functional Programs
Computer Science Colloquium, King's College London, 5 December 2005.
Abstract, Slides Pdf (610 KB).
- Olaf Chitil: A Theory of Tracing Pure Functional Programs
21st British Colloquium for Theoretical Computer Science, BCTCS 2005, Nottingham, UK, 22 March 2005.
Abstract, Slides (12) Pdf (51 KB).
Papers
- Comprehending Finite Maps for Algorithmic
Debugging of Higher-Order Functional Programs. Olaf Chitil and Thomas Davie. Submitted to MPC 2008.
- Monadic prompt lazy assertions in Haskell. Olaf Chitil and Frank Huch. In Zhong Shao, editor, Programming Languages and Systems, 5th Asian Symposium, APLAS 2007, LNCS 4807, pages 38-53. Springer, November 2007.
- A pattern logic for prompt lazy assertions. Olaf Chitil and Frank Huch. In Implementation and Application of Functional Languages, 18th International Workshop, IFL 2006, LNCS 4449, pages 126-144, April 2007.
- Algorithmic debugging and trusted functions. Yong Luo and Olaf Chitil. Technical report 10-07, University of Kent, Computing Laboratory, UK, August 2007.
- Algorithmic debugging with cyclic traces of lazy functional programs. Yong Luo and Olaf Chitil. Technical report 9-07, University of Kent, Computing Laboratory, UK, August 2007.
- Algorithmic debugging for locally defined functions. Yong Luo and Olaf Chitil. Technical report 8-07, University of Kent, Computing Laboratory, UK, August 2007.
- Replacing unevaluated parts in the traces of functional programs. Yong Luo and Olaf Chitil. Technical report 7-07, University of Kent, Computing Laboratory, UK, August 2007.
- Replacing unevaluated parts in the traces of functional programs. Yong Luo and Olaf Chitil. In Draft Proceedings of the 18th International Symposium on Implementation and Application of Functional Languages, IFL 2006, pages 304-325, Budapest, Hungary, September 2006. Eotvos Lorand University.
- Display of functional values for debugging. Thomas Davie and Olaf Chitil. In Draft Proceedings of the 18th International Symposium on Implementation and Application of Functional Languages, IFL 2006, pages 326-337, Budapest, Hungary, September 2006. Eotvos Lorand University.
- One right does make a wrong. Thomas Davie and Olaf Chitil. In Pre-Proceedings of the Seventh Symposium on Trends in Functional Programming, TFP 2006, April 2006.
-
Combining Algorithmic Debugging and Program Slicing. Josep Silva and Olaf Chitil.
Eighth ACM-SIGPLAN International Symposium on Principles and Practice of Declarative Programming (PPDP 2006). Pages 157-166. © ACM Press. July 2006.
- Proving the correctness of algorithmic debugging for functional programs. Yong Luo and Olaf Chitil. In Trends in Functional Programming, volume 7. Intellect, pages 19-34. 2007.
- Structure and properties of traces for functional programs. Olaf Chitil and Yong Luo. In Ian Mackie, editor, Proceedings of the 3rd International Workshop on Term Graph Rewriting, Termgraph 2006, ENTCS, pages 39-63. Elsevier, April 2007.
- Promoting non-strict programming. Olaf Chitil. In Draft Proceedings of the 18th International Symposium on Implementation and Application of Functional Languages, IFL 2006, pages 512-516, Budapest, Hungary, September 2006. Eotvos Lorand University.
Hat Days