Specialisation of Higher-Order Functions for Debugging

Bernard Pope and Lee Naish

In Proc. of the International Workshop on Functional and (Constraint) Logic Programming (WFLP 2001) , Report No. 2017, University of Kiel


Because functions are abstract values without convenient print representations, implementing debuggers which support higher-order code is a challenge. We present an algorithm for statically specialising higher-order functions and encoding higher-order values to allow printing. We define our algorithm for a small functional language and discuss how it may be extended to support sophisticated features of modern functional programming languages. This research forms part of a project (Supported by the Australian Research Council) to build a declarative debugger for Haskell, based primarily on source to source transformation.