A Declarative Debugging Scheme


A Declarative Debugging Scheme

Lee Naish


We present a very simple but flexible declarative debugging scheme. A declarative debugger can be defined in Prolog with a single clause and relies on the definition of just two additional predicates. With suitable definitions of these predicates the debugger can diagnose several classes of bugs in many languages. We give examples of diagnosis of wrong answers in functional, relational and object oriented languages as well as missing answers in relational languages and calls which are not well-defined in functional languages. By using declarative semantics of programs, the debugger is able to hide complex execution mechanisms such as unification, backtracking, coroutining, parallelism, higher order functions, lazy evaluation, message passing and inheritance.

Keywords: declarative algorithmic debugging, Prolog, lazy higher order function, object oriented.

Some related things:
Lee