[go: up one dir, main page]

Skip to main content

Generating Specialized Rules and Programs for Demand-Driven Analysis

  • Conference paper
Algebraic Methodology and Software Technology (AMAST 2008)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 5140))

Abstract

Many complex analysis problems can be most clearly and easily specified as logic rules and queries, where rules specify how given facts can be combined to infer new facts, and queries select facts of interest to the analysis problem at hand. However, it has been extremely challenging to obtain efficient implementations from logic rules and to understand their time and space complexities, especially for on-demand analysis driven by queries.

This paper describes a powerful method for generating specialized rules and programs for demand-driven analysis from Datalog rules and queries, and further for providing time and space complexity guarantees. The method combines recursion conversion with specialization of rules and then uses a method for program generation and complexity calculation from rules. We compare carefully with the best prior methods by examining many variants of rules and queries for the same graph reachability problems, and show the application of our method in implementing graph query languages in general.

This work was supported in part by NSF under grants CCR-0306399 and CCF-0613913.

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.

Similar content being viewed by others

References

  1. Afrati, F.N., Gergatsoulis, M., Toni, F.: Linearisability on datalog programs. Theoretical Computer Science 308(1-3), 199–226 (2003)

    Article  MATH  MathSciNet  Google Scholar 

  2. Bancilhon, F., Ramakrishnan, R.: An amateur’s introduction to recursive query processing strategies. In: Proc. of the 1986 ACM SIGMOD Intl. Conf. on Management of Data, pp. 16–52 (1986)

    Google Scholar 

  3. Barker, S., Leuschel, M., Varea, M.: Efficient and flexible access control via logic program specialisation. In: Proc. of the 2004 ACM SIGPLAN Workshop on Partial Evaluation and Semantics-based Program Manipulation, pp. 190–199 (2004)

    Google Scholar 

  4. Beeri, C., Ramakrishnan, R.: On the power of magic. J. Logic Programming 10(1/2/3&4), 255–299 (1991)

    Article  MATH  MathSciNet  Google Scholar 

  5. Brough, D.R., Hogger, C.J.: Grammar-related transformations of logic programs. New Generation Computing 9(2), 115–134 (1991)

    Article  MATH  Google Scholar 

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

    Google Scholar 

  7. Chen, W., Warren, D.S.: Tabled evaluation with delaying for general logic programs. J. ACM 43(1), 20–74 (1996)

    Article  MATH  MathSciNet  Google Scholar 

  8. Consens, M.P., Mendelzon, A.O.: GraphLog: a visual formalism for real life recursion. In: Proc. of the 9th ACM SIGMOD-SIGACT-SIGART Symp. on Principles of Database Systems, pp. 404–416 (1990)

    Google Scholar 

  9. Gottlob, G., Koch, C.: Monadic datalog and the expressive power of languages for web information extraction. J. ACM 51(1), 74–113 (2004)

    Article  MathSciNet  Google Scholar 

  10. Greco, S., Saccà, D., Zaniolo, C.: Grammars and automata to optimize chain logic queries. Intl. J. Foundations of Computer Science 10(3), 349 (1999)

    Article  Google Scholar 

  11. Hristova, K., Liu, Y.A.: Improved algorithm complexities for linear temporal logic model checking of pushdown systems. In: Proc. of 7th Intl. Conf. on Verification, Model Checking and Abstract Interpretation, pp. 190–206 (2006)

    Google Scholar 

  12. Hristova, K., Rothamel, T., Liu, Y.A., Stoller, S.D.: Efficient type inference for secure information flow. In: Technical Report DAR 07-35, Computer Science Department, SUNY Stony Brook (May 2007); A preliminary version of this work appeared in Proc. of the 2006 ACM SIGPLAN Workshop on Programming Languages and Analysis for Security

    Google Scholar 

  13. Hristova, K., Tekle, K.T., Liu, Y.A.: Efficient trust management policy analysis from rules. In: Proc. of the 9th ACM SIGPLAN Intl. Conf. on Principles and Practice of Declarative Programming (July 2007)

    Google Scholar 

  14. Kifer, M., Lozinskii, E.L.: A framework for an efficient implementation of deductive database systems. In: Proc. of the Advanced Database Symposium (1986)

    Google Scholar 

  15. Kifer, M., Lozinskii, E.L.: On compile-time query optimization in deductive databases by means of static filtering. ACM Trans. Database Systems 15(3), 385–426 (1990)

    Article  MathSciNet  Google Scholar 

  16. Lam, M.S., Whaley, J., Livshits, V.B., Martin, M.C., Avots, D., Carbin, M., Unkel, C.: Context-sensitive program analysis as database queries. In: Proc. of the 24th ACM SIGACT-SIGMOD-SIGART Symp. on Principles of Database Systems, pp. 1–12 (2005)

    Google Scholar 

  17. Leuschel, M.: Logic program specialisation. In: Hatcliff, J., Mogensen, T.Æ., Thiemann, P. (eds.) DIKU 1998. LNCS, vol. 1706, pp. 155–188. Springer, Heidelberg (1999)

    Google Scholar 

  18. Liu, Y.A., Rothamel, T., Yu, F., Stoller, S.D., Hu, N.: Parametric regular path queries. In: Proc. of the ACM SIGPLAN 2004 Conf. on Programming Language Design and Implementation, pp. 219–230 (2004)

    Google Scholar 

  19. Liu, Y.A., Stoller, S.D.: From datalog rules to efficient programs with time and space guarantees. In: Proc. of the 5th Intl. ACM SIGPLAN Conf. on Principles and Practice of Declarative Programming, pp. 172–183 (2003)

    Google Scholar 

  20. Liu, Y.A., Stoller, S.D.: Querying complex graphs. In: Proc. of the 7th Intl. Symp. on Practical Aspects of Declarative Languages, pp. 199–214 (2006)

    Google Scholar 

  21. Maier, D., Warren, D.S.: Computing with logic: logic programming with Prolog. Benjamin-Cummings Publishing Co. Inc., Redwood City (1988)

    MATH  Google Scholar 

  22. Melski, D., Reps, T.W.: Interconvertibility of a class of set constraints and context-free-language reachability. Theoretical Computer Science 248(1-2), 29–98 (2000)

    Article  MATH  MathSciNet  Google Scholar 

  23. Ramakrishnan, R., Sagiv, Y., Ullman, J.D., Vardi,: Proof-tree transformation theorems and their applications. In: Proc. of the 8th ACM SIGACT-SIGMOD-SIGART Symp. on Principles of Database Systems, pp. 172–181 (1989)

    Google Scholar 

  24. Sagonas, K.F., Swift, T., Warren, D.S.: XSB as a deductive database. In: Proc. of the 1994 ACM SIGMOD Intl. Conf. on Management of Data, p. 512 (1994)

    Google Scholar 

  25. Zhang, W., Yu, C.T., Troy, D.: Necessary and sufficient conditions to linearize double recursive programs in logic databases. ACM Trans. on Database Systems 15(3), 459–482 (1990)

    Article  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

José Meseguer Grigore Roşu

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Tekle, K.T., Hristova, K., Liu, Y.A. (2008). Generating Specialized Rules and Programs for Demand-Driven Analysis. In: Meseguer, J., RoÅŸu, G. (eds) Algebraic Methodology and Software Technology. AMAST 2008. Lecture Notes in Computer Science, vol 5140. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-79980-1_26

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-79980-1_26

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-79979-5

  • Online ISBN: 978-3-540-79980-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics