The NU-Prolog debugging environment

This is a reasonably old paper, written before I started using Latex and associated tools. Bert Thompson was able to reconstruct a Postscript version which bears reasonable resemblance to the original paper or technical report. He also worked on producing a release of the implementation of the system and wrote the manual.

The NU-Prolog debugging environment

Lee Naish
Philip W. Dart
Justin Zobel

One of the advantages of logic programming is that it is easy to reason about what is computed by a program (the declarative semantics) independently of how it is computed (the procedural semantics). As well as being useful for writing, transforming and understanding programs, these two alternative viewpoints are useful for testing and debugging programs. By taking full advantage of declarative and procedural semantics, we anticipate that very powerful programming environments can be constructed.

In this paper we describe the NU-Prolog Debugging Environment (NUDE) which is currently under development. NUDE has three main components. First, several static program analysis tools are used for detecting program errors such as simple typing mistakes, `type' errors, infinite loops and floundering. Second, dynamic tools are provided for diagnosing incorrect behaviour of a query at run time. There are tools for diagnosing wrong answers, missing answers, infinite loops and floundering. Third, there is a mechanism for automatically testing programs to detect queries with wrong or missing answers. The three components are integrated into the NU-Prolog system, supporting a rapid test-debug-recompile cycle.