Declarative debugging of lazy FP - implementation

NUE-Prolog is a combined relational plus functional language supporting higher order functions and lazy evaluation as well as full NU-Prolog, including coroutining. It is an extension of NU-Prolog which allows evaluable functions to be defined. It is implemented by transformation into standard NU-Prolog.

The declarative debugger for the functional part of the language is implemented by modifying the transformation so that functions return a representation of the computation performed as well as the final result of evaluation. The debugger evaluates a functional expression and if the result is wrong the representation of the computation is used to query the user and find what function definition is buggy. For more details, see the paper.


Source code