Skip to main content

Declarative source debugging

  • Diagnosis And Repair
  • Conference paper
  • First Online:
EPIA 91 (EPIA 1991)

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 541))

Included in the following conference series:

  • 126 Accesses

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].

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Miguel Calejo, A Framework for Declarative Prolog Debugging, PhD thesis, Universidade Nova de Lisboa (in preparation)

    Google Scholar 

  2. Miguel Calejo and Luís Moniz Pereira, The HyperTracer Debugging Environment, technical report, DI/UNL

    Google Scholar 

  3. 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 

  4. 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 

  5. 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 

  6. 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 

  7. 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 

  8. Ehud Y. Shapiro, Algorithmic Program Debugging, MIT Press 1982.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Pedro Barahona Luís Moniz Pereira António Porto

Rights and permissions

Reprints 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

Publish with us

Policies and ethics