Declarative source debugging
We explore the idea of basing declarative debugging on the search for buggy textual formulas in the program, rather than on the search for computed buggy formula instances. The motivation is to build declarative debuggers requiring less oracle queries, at the cost of loosing information about the variable bindings of the diagnosis. This new approach we call declarative source debugging, as opposed to declarative execution debugging.
A motivating example for pure Prolog is given, consisting of an append computation with a wrong solution. Afterwards we present a declarative source debugging algorithm, and simulate it on some other examples. Under an (aparently reasonable) assumption the number of queries needed to derive a diagnosis is logarithmic with the number of program source clauses, rather than with the number of derivation nodes as in conventional declarative debugging, when using no case-dependent information.
Our conclusions carry over easily to other bug symptom types not exemplified and to impure Prolog, by adopting the conceptual framework of [Pereira Calejo 88, 89] and thereby uniformizing their treatment. This is reported in [Calejo 91].
KeywordsLogic Program Query Performance Query Algorithm Oracle Query Wrong Solution
Unable to display preview. Download preview PDF.
- [Calejo 91]Miguel Calejo, A Framework for Declarative Prolog Debugging, PhD thesis, Universidade Nova de Lisboa (in preparation)Google Scholar
- [Calejo Pereira 89]Miguel Calejo and Luís Moniz Pereira, The HyperTracer Debugging Environment, technical report, DI/UNLGoogle Scholar
- [Drabent et al. 88]W. Drabent, S. Nadjm-Tehrani and J. Maluszynski, “Algorithmic Debugging with Assertions” in MET A88 Proceedings (eds. J. Lloyd), MIT Press, Bristol, 1988.Google Scholar
- [Lichtenstein Shapiro 88]Y. Lichtenstein and E. Shapiro, “Abstract algorithmic debugging” in 5 th International Conference and Symposium on Logic Programming (eds. K. Bowen and R.A. Kowalski), MIT Press, Seattle, 1315–1336, 1988.Google Scholar
- [Pereira 86]Luís Moniz Pereira, Rational debugging in logic programming, in Procs. of the 3rd International Logic Programming Conference, E.Shapiro (ed.), Lecture Notes in Computer Science 225, Springer Verlag 1986.Google Scholar
- [Pereira Calejo 88]Luís Moniz Pereira and Miguel Calejo, A framework for Prolog debugging, Procs. 5th Int. Conf. on Logic Programming, Kowalski and Bowen (eds.), MIT Press 1988.Google Scholar
- [Pereira Calejo 89]Luís Moniz Pereira and Miguel Calejo, Algorithmic Debugging of Prolog Side-Effects, Procs. of the 4th Portuguese AI Conference, J.P.Martins and E. Morgado (eds.), Lecture Notes in Artificial Intelligence, Springer-Verlag 1989.Google Scholar
- [Shapiro 82]Ehud Y. Shapiro, Algorithmic Program Debugging, MIT Press 1982.Google Scholar