Declarative Datalog Debugging for Mere Mortals

  • Sven Köhler
  • Bertram Ludäscher
  • Yannis Smaragdakis
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7494)

Abstract

Tracing why a “faulty” fact A is in the model M = P(I) of program P on input I quickly gets tedious, even for small examples. We propose a simple method for debugging and “logically profiling” P by generating a provenance-enriched rewriting P̂, which records rule firings according to the logical semantics. The resulting provenance graph can be easily queried and analyzed using a set of predefined and ad-hoc queries. We have prototypically implemented our approach for two different Datalog engines (DLV and LogicBlox), demonstrating the simplicity, effectiveness, and system-independent nature of our method.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Abiteboul, S., Hull, R., Vianu, V.: Foundations of Databases. Addison-Wesley (1995)Google Scholar
  2. 2.
    Bancilhon, F., Ramakrishnan, R.: An Amateur’s Introduction to Recursive Query Processing Strategies. In: Readings in Database Systems, pp. 507–555 (1988)Google Scholar
  3. 3.
    Caballero, R., García-Ruiz, Y., Sáenz-Pérez, F.: A Theoretical Framework for the Declarative Debugging of Datalog Programs. In: Schewe, K.-D., Thalheim, B. (eds.) SDKB 2008. LNCS, vol. 4925, pp. 143–159. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  4. 4.
    Calimeri, F., Leone, N., Ricca, F., Veltri, P.: A visual tracer for DLV. In: Workshop on Software Engineering for Answer Set Programming, SEA (2009)Google Scholar
  5. 5.
    Chiticariu, L., Tan, W.C.: Debugging Schema Mappings with Routes. In: VLDB, pp. 79–90 (2006)Google Scholar
  6. 6.
    Chomicki, J., Imieliński, T.: Finite representation of infinite query answers. ACM Transactions on Database Systems (TODS) 18(2), 181–223 (1993)CrossRefGoogle Scholar
  7. 7.
    Drabent, L., Nadjm-Tehrani, S.: Algorithmic Debugging with Assertions. In: Meta-programming in Logic Programming (1989)Google Scholar
  8. 8.
    Green, T.J., Karvounarakis, G., Tannen, V.: Provenance semirings. In: PODS (2007)Google Scholar
  9. 9.
    Green, T.J., Karvounarakis, G., Ives, Z.G., Tannen, V.: Update Exchange with Mappings and Provenance. In: VLDB, pp. 675–686 (2007)Google Scholar
  10. 10.
    Kunen, K.: Declarative Semantics of Logic Programming. Bulletin of the EATCS 44, 147–167 (1991)MATHGoogle Scholar
  11. 11.
    Lausen, G., Ludäscher, B., May, W.: On Active Deductive Databases: The Statelog Approach. In: Kifer, M., Voronkov, A., Freitag, B., Decker, H. (eds.) Transactions and Change in Logic DBs. LNCS, vol. 1472, pp. 69–106. Springer, Heidelberg (1998)CrossRefGoogle Scholar
  12. 12.
    Leone, N., Pfeifer, G., Faber, W., Eiter, T., Gottlob, G., Perri, S., Scarcello, F.: The DLV system for knowledge representation and reasoning. ACM Transactions on Computational Logic (TOCL) 7(3), 499–562 (2006)MathSciNetCrossRefGoogle Scholar
  13. 13.
    Ludäscher, B.: Integration of Active and Deductive Database Rules. Ph.D. thesis, Albert-Ludwigs Universität, Freiburg, Germany (1998)Google Scholar
  14. 14.
    Marczak, W.R., Huang, S.S., Bravenboer, M., Sherr, M., Loo, B.T., Aref, M.: SecureBlox: Customizable Secure Distributed Data Processing. In: SIGMOD (2010)Google Scholar
  15. 15.
    Oetsch, J., Pührer, J., Tompits, H.: Stepping through an Answer-Set Program. In: Delgrande, J.P., Faber, W. (eds.) LPNMR 2011. LNCS, vol. 6645, pp. 134–147. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  16. 16.
    Perri, S., Ricca, F., Terracina, G., Cianni, D., Veltri, P.: An integrated graphic tool for developing and testing DLV programs. In: Workshop on Software Engineering for Answer Set Programming, SEA (2007)Google Scholar
  17. 17.
    Ramakrishnan, R., Ullman, J.: A Survey of Deductive Database Systems. Journal of Logic Programming 23(2), 125–149 (1995)MathSciNetCrossRefGoogle Scholar
  18. 18.
    Shapiro, E.: Algorithmic program debugging. Dissertation Abstracts International Part B: Science and Engineering 43(5) (1982)Google Scholar
  19. 19.
    Tobermann, G., Beckstein, C.: What’s in a Trace: The Box Model Revisited. In: Adsul, B. (ed.) AADEBUG 1993. LNCS, vol. 749, pp. 171–187. Springer, Heidelberg (1993)CrossRefGoogle Scholar
  20. 20.
    Wielemaker, J., Schrijvers, T., Triska, M., Lager, T.: SWI-Prolog. CoRR abs/1011.5332 (2010)Google Scholar
  21. 21.
    Zaniolo, C., Arni, N., Ong, K.: Negation and Aggregates in Recursive rules: the LDL++ Aprrpach. In: Ceri, S., Tsur, S., Tanaka, K. (eds.) DOOD 1993. LNCS, vol. 760, pp. 204–221. Springer, Heidelberg (1993)CrossRefGoogle Scholar
  22. 22.
    Zeller, A.: Isolating cause-effect chains from computer programs. In: SIGSOFT Symposium on Foundations of Software Engineering (2002)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Sven Köhler
    • 1
  • Bertram Ludäscher
    • 1
  • Yannis Smaragdakis
    • 2
    • 3
  1. 1.Department of Computer ScienceUniversity of CaliforniaDavisUSA
  2. 2.LogicBlox, Inc.AtlantaUSA
  3. 3.Univ. of AthensGreece

Personalised recommendations