On the Complexity Analysis of Static Analyses

  • David McAllester
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1694)

Abstract

This paper investigates bottom-up logic programming as a formalism for expressing static analyses. The main technical contribution consists of two meta-complexity theorems which allow, in many cases, the asymptotic running time of a bottom-up logic program to be determined by inspection. It is well known that a datalog program runs in O(nk) time where k is the largest number of free variables in any single rule. The theorems given here are significantly more refined. A variety of algorithms given as bottom-up logic programs are analyzed as examples.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    A. Aiken, E. Wimmers, and T.K. Lakshman. Soft typing with conditional types. In ACM Symposium on Principles of Programming Languages, pages 163–173. Association for Computing Machinery, 1994.Google Scholar
  2. 2.
    David Basin and Herald Ganzinger. Automated complexity analysis based on ordered resolution. In Proceedings, Eleventh Annual IEEE Symposium on Logic in Computer Science, pages 456–465. IEEE Computer Society Press, 1996.Google Scholar
  3. 3.
    A. Bondorf and A. Jorgensen. Efficient analysis for realistic off-line partial evaluation. Journal of functional Programming, 3(3), 1993.Google Scholar
  4. 4.
    Keith L. Clark. Logic programming schemes and their implementations. In Jean-Louis Lassez and Gordon Plotkin, editors, Computational Logic. MIT Press, 1991.Google Scholar
  5. 5.
    William Downing and Jean H. Gallier. Linear time algorithms for testing the satisfiability of propositional horn formulae. Journal of Logic Programming, 1(3):267–284, 1984.CrossRefMathSciNetGoogle Scholar
  6. 6.
    Manual Fähndrich, Jeffery Foster, Zhendong Su, and Alexander Aiken. Partial online cycle elimination in inclusion constraint graphs. In PLDI98, 1998.Google Scholar
  7. 7.
    Robert Givan and David McAllester. New results on local inference relations. In Principles of Knowlwedge Representation and Reasoning: Proceedings of the Third International Conference, pages 403–412. Morgan Kaufman Press, October 1992. internet file ftp://ftp.ai.mit.edu:/pub/users/dam/kr92.ps.
  8. 8.
    N. Heintze. Set based analysis of ml programs. In ACM Conference on Lisp and Functional Programming, pages 306–317, 1994.Google Scholar
  9. 9.
    Nevin Heintze and David McAllester. Linear time subtransitive control flow analysis. In PLDI-97, 1997.Google Scholar
  10. 10.
    Nevin Heintze and David McAllester. On the cubic bottleneck in subtyping and flow analysis. In Proceedings, Twelvth Annual IEEE Symposium on Logic in Computer Science, pages 342–361. IEEE Computer Society Press, 1997.Google Scholar
  11. 11.
    Fritz Henglein. Breaking through the n 3 barrier: Faster object type inference. Theory and Practice of Object Systems (TAPOS), 5(1):57–72, 1999. A Preliminary Version appeared in FOOL4.CrossRefGoogle Scholar
  12. 12.
    R. A. Kowalski. Predicate logic as a programming language. In IFIP 74, 1974.Google Scholar
  13. 13.
    Dexter Kozen, Jens Palsberg, and Michael I. Schwartzbach. Efficient inference of partial types. J. Comput. Syst. Sci., 49(2):306–324, October 1994.MATHCrossRefMathSciNetGoogle Scholar
  14. 14.
    D. McAllester. Automatic recognition of tractability in inference relations. JACM, 40(2):284–303, April 1993. internet file ftp://ftp.ai.mit.edu:/pub/users/dam/jacm2.ps.MATHCrossRefMathSciNetGoogle Scholar
  15. 15.
    David McAllester. Inferring recursive types. Available at http://www.research.mit.edu/~dmac, 1996.
  16. 16.
    E. Melski and T. Reps. Intercovertability of set constraints and context free language reachability. In PEPM’97, 1997.Google Scholar
  17. 17.
    Jeff Naughton and Raghu Ramakrishnan. Bottom-up evaluation of logic programs. In Jean-Louis Lassez and Gordon Plotkin, editors, Computational Logic. MIT Press, 1991.Google Scholar
  18. 18.
    J. Palsberg. Efficient inference of object types. Information and Computation, 123(2):198–209, 1995.MATHCrossRefMathSciNetGoogle Scholar
  19. 19.
    J. Palsberg and P. O’Keefe. A type system equivalent to flow analysis. In POPL95, pages 367–378, 1995.Google Scholar
  20. 20.
    M. S. Paterson and M. N. Wegman. Linear unification. JCSS, 16:158–167, 1978.MATHMathSciNetGoogle Scholar
  21. 21.
    J. Ullman. Bottom-up beats top-down for datalog. In Proceedings of the Eigth ACM SIGACT-SIGMOD-SIGART Symposium on the Principles of Database Systems, pages 140–149, March 1989.Google Scholar
  22. 22.
    M. Vardi. Complexity of relational query languages. In 14th Symposium on Theory of Computation, pages 137–146, 1982.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1999

Authors and Affiliations

  • David McAllester
    • 1
  1. 1.AT&T Labs-ResearchFlorham ParkUSA

Personalised recommendations