Skip to main content

Defining Datalog in Rewriting Logic

  • Conference paper
Logic-Based Program Synthesis and Transformation (LOPSTR 2009)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 6037))

Abstract

In recent work, the effectiveness of using declarative languages has been demonstrated for many problems in program analysis. Using a simple relational query language, like Datalog, complex interprocedural analyses involving dynamically created objects can be expressed in just a few lines. By exploiting the power of the Rewriting Logic language Maude, we aim at transforming Datalog programs into efficient rewrite systems that compute the same answers. A prototype has been implemented and applied to some real-world Datalog-based analyses. Experimental results show that the performance of solving Datalog queries in rewriting logic is comparable to state-of-the-art Datalog solvers.

This work has been partially supported by the eu (feder), the Spanish mec/micinn under grant tin 2007-68093-C02, the Generalitat Valenciana under grant Emergentes gv/2009/024, and the Universidad Politécnica de Valencia under grant paid-06-07. M. A. Feliú was partially supported by the Spanish mec fpu grant AP2008-00608.

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. Alpuente, M., Feliú, M., Joubert, C., Villanueva, A.: Defining Datalog in Rewriting Logic. Tech. Rep. DSIC-II/07/09, DSIC, Technical University of Valencia (2009)

    Google Scholar 

  2. Alpuente, M., Feliú, M., Joubert, C., Villanueva, A.: Implementing Datalog in Maude. In: Proc. of I Taller de Programación Funcional (TPF 2009), 15–22 (2009)

    Google Scholar 

  3. Alpuente, M., Feliú, M., Joubert, C., Villanueva, A.: Using Datalog and Boolean Equation Systems for Program Analysis. In: Cofer, D., Fantechi, A. (eds.) FMICS 2008. LNCS, vol. 5596, pp. 215–231. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  4. Andersen, H.R.: Model checking and boolean graphs. Theoretical Computer Science 126(1), 3–30 (1994)

    Article  MATH  MathSciNet  Google Scholar 

  5. Bancilhon, F., Maier, D., Sagiv, Y., Ullman, J.D.: Magic Sets and Other Strange Ways to Implement Logic Programs. In: Proc. of the 5th ACM SIGACT-SIGMOD Symposium on Principles of Database Systems (PODS 1986), pp. 1–15. ACM Press, New York (1986)

    Chapter  Google Scholar 

  6. Ceri, S., Gottlob, G., Tanca, L.: Logic Programming and Databases. Springer, Heidelberg (1990)

    Google Scholar 

  7. Clavel, M., Durán, F., Ejer, S., Lincoln, P., Martí-Oliet, N., Meseguer, J., Talcott, C.: All About Maude - A High-Performance Logical Framework. LNCS, vol. 4350. Springer, Heidelberg (2007)

    MATH  Google Scholar 

  8. Hill, P.M., Lloyd, J.W.: Analysis of Meta-Programs. In: Proc. of the First International Workshop on Meta-Programming in Logic (META 1988), pp. 23–51 (1988)

    Google Scholar 

  9. Leeuwen, J. (ed.): Formal Models and Semantics, vol. B. Elsevier, The MIT Press (1990)

    Google Scholar 

  10. Liu, Y., Stoller, S.: From Datalog Rules to Efficient Programs with Time and Space Guarantees. ACM Transactions on Programming Languages and Systems 31(6) (2009)

    Google Scholar 

  11. Livshits, B., Whaley, J., Lam, M.: Reflection Analysis for Java. In: Yi, K. (ed.) APLAS 2005. LNCS, vol. 3780, pp. 139–160. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  12. Marchiori, M.: Logic Programs as Term Rewriting Systems. In: Rodríguez-Artalejo, M., Levi, G. (eds.) ALP 1994. LNCS, vol. 850, pp. 223–241. Springer, Heidelberg (1994)

    Google Scholar 

  13. Marchiori, M.: Unravelings and ultra-properties. In: Hanus, M., Rodríguez-Artalejo, M. (eds.) ALP 1996. LNCS, vol. 1139, pp. 107–121. Springer, Heidelberg (1996)

    Google Scholar 

  14. Meseguer, J.: Conditional Rewriting Logic as a Unified Model of Concurrency. Theoretical Computer Science 96(1), 73–155 (1992)

    Article  MATH  MathSciNet  Google Scholar 

  15. Reddy, U.: Transformation of Logic Programs into Functional Programs. In: Proc. of the Symposium on Logic Programming (SLP 1984), pp. 187–197. IEEE Computer Society Press, Los Alamitos (1984)

    Google Scholar 

  16. Schneider-Kamp, P., Giesl, J., Serebrenik, A., Thiemann, R.: Automated Termination Analysis for Logic Programs by Term Rewriting. In: Puebla, G. (ed.) LOPSTR 2006. LNCS, vol. 4407, pp. 177–193. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  17. Ullman, J.D.: Principles of Database and Knowledge-Base Systems. In: The New Technologies, vol. I, II. Computer Science Press, Rockville (1989)

    Google Scholar 

  18. Vieille, L.: Recursive Axioms in Deductive Databases: The Query/Subquery Approach. In: Proc. of the 1st International Conference on Expert Database Systems (EDS 1986), pp. 253–267 (1986)

    Google Scholar 

  19. Whaley, J., Avots, D., Carbin, M., Lam, M.S.: Using Datalog with Binary Decision Diagrams for Program Analysis. In: Yi, K. (ed.) APLAS 2005. LNCS, vol. 3780, pp. 97–118. Springer, Heidelberg (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

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Alpuente, M., Feliú, M.A., Joubert, C., Villanueva, A. (2010). Defining Datalog in Rewriting Logic. In: De Schreye, D. (eds) Logic-Based Program Synthesis and Transformation. LOPSTR 2009. Lecture Notes in Computer Science, vol 6037. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-12592-8_14

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-12592-8_14

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-12591-1

  • Online ISBN: 978-3-642-12592-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics