NUE-Prolog debugger
A Declarative Debugger for
a Logical-Functional Language
Lee Naish
Tim Barbour
Logic and functional programming languages have
many advantages
and there is a growing trend to develop languages
which incorporate both these paradigms. One of the disadvantages of
such languages is that the execution mechanisms are so complex that
traditional debugging methods are difficult to use. Declarative debugging
techniques have been successful applied to Prolog and more recently
functional languages. They allow programs to be debugged using only
knowledge of the declarative semantics, hiding the details of the
execution from the programmer.
In this paper we describe a declarative
debugger for a combined logic and functional programming
language, NUE-Prolog.
The debugger combines both existing and new algorithms.
The main new algorithm is for declarative debugging of functions which
for some inputs are not well-defined (typically resulting in a
runtime error).
The algorithms can easily be adapted to other logic and functional
languages.
Keywords: logic programming, functional programming, NUE-Prolog,
declarative debugging
Lee