In this paper we discuss a declarative approach to debugging for DATALOG, a logic programming language based on a bottom-up evaluation strategy. We focus on the DATALOG implementation provided by the ALPE programming environment. In ALPE, a DATALOG program is translated by the Logic Query Compiler — LQC — into a Prolog program whose top-down evaluation corresponds to the bottom-up evaluation of the source DATALOG program. It follows then that the computational models of the source and the compiled programs are completely different. This makes the use of a tracer practically pointless.
Conversely, the definition of a declarative debugger in this framework requires that an adeguate representation of the computation steps be stored in order to rebuild the evaluation tree and to allow a conversation with the user to occur at source program level. In this paper we show how to produce such information from the DATALOG program.
This work has been supported by
Progetto Finalizzato Sistemi Informatici e Calcolo Parallelo
of CNR. undergrant n. 90.00757.69