Skip to main content

A Theoretical Framework for the Declarative Debugging of Datalog Programs

  • Conference paper
Semantics in Data and Knowledge Bases (SDKB 2008)

Part of the book series: Lecture Notes in Computer Science ((LNISA,volume 4925))

Included in the following conference series:

Abstract

The logic programming language Datalog has been extensively researched as a query language for deductive databases. Although similar to Prolog, the Datalog operational mechanisms are more intricate, leading to computations quite hard to debug by traditional approaches. In this paper, we present a theoretical framework for debugging Datalog programs based on the ideas of declarative debugging. In our setting, a debugging session starts when the user detects an unexpected answer for some query, and ends with the debugger pointing to either an erroneous predicate or to a set of mutually recursive predicates as the cause of the unexpected answer. Instead of representing the computations by means of trees, as usual in declarative debugging, we propose graphs as a more convenient structure in the case of Datalog, proving formally the soundness and completeness of the debugging technique. We also present a debugging tool implemented in the publicly available deductive database system DES following this theoretical framework.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Ramakrishnan, R., Ullman, J.: A survey of research on Deductive Databases. The Journal of Logic Programming 23(2), 125–149 (1993)

    Article  Google Scholar 

  2. Beeri, C., Ramakrishnan, R.: On the power of magic. In: Proceedings of the Sixth ACM Symposium on Principles of Database Systems, pp. 269–284 (1987)

    Google Scholar 

  3. Dietrich, S.W.: Extension tables: Memo relations in logic programming. In: SLP, pp. 264–272 (1987)

    Google Scholar 

  4. Arora, T., Ramakrishnan, R., Roth, W.G., Seshadri, P., Srivastava, D.: Explaining program execution in deductive systems. In: Deductive and Object-Oriented Databases, pp. 101–119 (1993)

    Google Scholar 

  5. Wieland, C.: Two explanation facilities for the deductive database management system DeDEx. In: Kangassalo, H. (ed.) ER 1990, pp. 189–203, ER Institute (1990)

    Google Scholar 

  6. Specht, G.: Generating explanation trees even for negations in deductive database systems. In: Proceedings of the 5th Workshop on Logic Programming Environments, Vancouver, Canada (1993)

    Google Scholar 

  7. Russo, F., Sancassani, M.: A declarative debugging environment for Datalog. In: Proceedings of the First Russian Conference on Logic Programming, pp. 433–441. Springer, London (1992)

    Google Scholar 

  8. Baral, C.: Knowledge representation, reasoning, and declarative problem solving. Cambridge University Press, Cambridge (2003)

    Book  MATH  Google Scholar 

  9. Syrjänen, T.: Debugging inconsistent answer set programs. In: Proceedings of the 11th International Workshop on Non-Monotonic Reasoning, Lake District, UK, pp. 77–84 (May 2006)

    Google Scholar 

  10. Brain, M., Gebser, M., Pührer, J., Schaub, T., Tompits, H., Woltran, S.: Debugging ASP Programs by Means of ASP. In: Baral, C., Brewka, G., Schlipf, J. (eds.) LPNMR 2007. LNCS (LNAI), vol. 4483, pp. 31–43. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  11. Caballero, R., García-Ruiz, Y., Sáenz-Pérez, F.: A new proposal for debugging datalog programs. In: 16th International Workshop on Functional and (Constraint) Logic Programming (WFLP 2007) (June 2007)

    Google Scholar 

  12. Shapiro, E.: Algorithmic Program Debugging. In: ACM Distiguished Dissertation. MIT Press, Cambridge (1982)

    Google Scholar 

  13. Sáenz-Pérez, F.: Datalog Educational System. User’s Manual. Technical Report 139-04, Facultad de Informática, Universidad Complutense de Madrid (2004), http://des.sourceforge.net/

  14. Apt, K.R., Blair, H.A., Walker, A.: Towards a theory of declarative knowledge. In: Foundations of deductive databases and logic programming, pp. 89–148. Morgan Kaufmann Publishers Inc., San Francisco (1988)

    Chapter  Google Scholar 

  15. Ullman, J.: Database and Knowledge-Base Systems Vols. I (Classical Database Systems) and II (The New Technologies). Computer Science Press (1995)

    Google Scholar 

  16. Chandra, A.K., Harel, D.: Horn clauses queries and generalizations. J. Log. Program. 2(1), 1–15 (1985)

    Article  MathSciNet  MATH  Google Scholar 

  17. Gelfond, M., Lifschitz, V.: The stable model semantics for logic programming. In: Kowalski, R.A., Bowen, K. (eds.) Proceedings of the Fifth International Conference on Logic Programming, pp. 1070–1080. MIT Press, Cambridge (1988)

    Google Scholar 

  18. Naish, L.: A Declarative Debugging Scheme. Journal of Functional and Logic Programming 3 (1997)

    Google Scholar 

  19. Caballero, R.: A declarative debugger of incorrect answers for constraint functional-logic programs. In: WCFLP 2005: Proceedings of the 2005 ACM SIGPLAN workshop on Curry and functional logic programming, pp. 8–13. ACM Press, New York (2005)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Caballero, R., García-Ruiz, Y., Sáenz-Pérez, F. (2008). A Theoretical Framework for the Declarative Debugging of Datalog Programs. In: Schewe, KD., Thalheim, B. (eds) Semantics in Data and Knowledge Bases. SDKB 2008. Lecture Notes in Computer Science, vol 4925. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-88594-8_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-88594-8_8

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-88593-1

  • Online ISBN: 978-3-540-88594-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics