Tracing and Profiling


Profiling

Functional programs often display elegance and simplicity; yet their computational behaviour may be complex, depending on the subtle interplay of several mechanisms in the process of evaluation. The programmer sees only recursion equations; the machine performs normal order graph reduction using those equations as rules. Solutions that are concise as defining formulae can give rise in their execution to surprisingly large demands for machine resources. We have developed effective profiling techniques for analysing and reducing the memory use of lazy functional programs and for investigating parallelism without a parallel machine.

Papers


Tracing

We have also been looking into new ways of tracing lazy, higher-order computations so that critical properties can be observed and improved.

Many potential benefits of functional programming are widely acknowledged for certain classes of application; but the subtle pragmatics of lazy evaluation, necessary for purely functional programming of interactive systems, can lead to intricate program structures and unpredictable evaluation costs.

We developed a graphical binary tree browser which enables the user to observe the execution of a program, by displaying the program graph and allowing this graph to be browsed at selected stages in the computation.

Papers

We later developed the Hat system, a comprehensive post-mortem tracer for Haskell, which allows the user to interact with a program trace using several different styles of browser: observation of equations, trails back from values to their causes, and an algorithmic debugger. Fuller information about the Hat system is at http://www.cs.york.ac.uk/fp/hat

Papers


York Functional Programming Group
(University of York Department of Computer Science)