Abstract
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].
Preview
Unable to display preview. Download preview PDF.
References
Miguel Calejo, A Framework for Declarative Prolog Debugging, PhD thesis, Universidade Nova de Lisboa (in preparation)
Miguel Calejo and Luís Moniz Pereira, The HyperTracer Debugging Environment, technical report, DI/UNL
W. Drabent, S. Nadjm-Tehrani and J. Maluszynski, “Algorithmic Debugging with Assertions” in MET A88 Proceedings (eds. J. Lloyd), MIT Press, Bristol, 1988.
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.
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.
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.
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.
Ehud Y. Shapiro, Algorithmic Program Debugging, MIT Press 1982.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1991 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Calejo, M., Pereira, L.M. (1991). Declarative source debugging. In: Barahona, P., Moniz Pereira, L., Porto, A. (eds) EPIA 91. EPIA 1991. Lecture Notes in Computer Science, vol 541. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-54535-2_37
Download citation
DOI: https://doi.org/10.1007/3-540-54535-2_37
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-54535-4
Online ISBN: 978-3-540-38459-5
eBook Packages: Springer Book Archive