On the complexity analysis of static analyses

This paper argues that for many algorithms, and static analysis algorithms in particular, bottom-up logic program presentations are clearer and simpler to analyze, for both correctness and complexity, than classical pseudo-code presentations. The main technical contribution consists of two 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 are presented and analyzed as examples.

[1]  Edsger W. Dijkstra,et al.  A note on two problems in connexion with graphs , 1959, Numerische Mathematik.

[2]  Robert A. Kowalski,et al.  Predicate Logic as Programming Language , 1974, IFIP Congress.

[3]  Mike Paterson,et al.  Linear unification , 1976, STOC '76.

[4]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[5]  Robert E. Shostak,et al.  An algorithm for reasoning about equality , 1977, CACM.

[6]  Robin Milner,et al.  A Theory of Type Polymorphism in Programming , 1978, J. Comput. Syst. Sci..

[7]  Alberto Martelli,et al.  An Efficient Unification Algorithm , 1982, TOPL.

[8]  Moshe Y. Vardi The complexity of relational query languages (Extended Abstract) , 1982, STOC '82.

[9]  David H. D. Warren,et al.  Parsing as Deduction , 1983, ACL.

[10]  Jean H. Gallier,et al.  Linear-Time Algorithms for Testing the Satisfiability of Propositional Horn Formulae , 1984, J. Log. Program..

[11]  David Maier,et al.  Magic sets and other strange ways to implement logic programs (extended abstract) , 1985, PODS '86.

[12]  Hisao Tamaki,et al.  OLD Resolution with Tabulation , 1986, ICLP.

[13]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[14]  Jeffrey D. Ullman,et al.  Bottom-up beats top-down for datalog , 1989, PODS '89.

[15]  Joxan Jaffar,et al.  A finite presentation theorem for approximating logic programs , 1989, POPL '90.

[16]  Olin Shivers,et al.  Data-flow analysis and type recovery in Scheme , 1990 .

[17]  Joxan Jaffar,et al.  A decision procedure for a class of set constraints , 1990, [1990] Proceedings. Fifth Annual IEEE Symposium on Logic in Computer Science.

[18]  Steve Young,et al.  Applications of stochastic context-free grammars using the Inside-Outside algorithm , 1990 .

[19]  Keith L. Clark,et al.  Logic-Programming Schemes and Their Implementation , 1991, Computational Logic - Essays in Honor of Alan Robinson.

[20]  Jeffrey F. Naughton,et al.  Bottom-Up Evaluation of Logic Programs , 1991, Computational Logic - Essays in Honor of Alan Robinson.

[21]  Robert Givan,et al.  New Results on Local Inference Relations , 1992, KR.

[22]  Thomas W. Reps,et al.  Demand Interprocedural Program Analysis Using Logic Databases , 1993, Workshop on Programming with Logic Databases , ILPS.

[23]  Anders Bondorf,et al.  Efficient Analysis for Realistic Off-Line Partial Evaluation , 1993, J. Funct. Program..

[24]  David A. McAllester Automatic recognition of tractability in inference relations , 1993, JACM.

[25]  Nevin Heintze,et al.  Set-based analysis of ML programs , 1994, LFP '94.

[26]  Konstantinos Sagonas,et al.  XSB as an efficient deductive database engine , 1994, SIGMOD '94.

[27]  Alexander Aiken,et al.  Soft typing with conditional types , 1994, POPL '94.

[28]  Jens Palsberg,et al.  Efficient inference of partial types , 1992, Proceedings., 33rd Annual Symposium on Foundations of Computer Science.

[29]  D. Kozen,et al.  Ecien t Inference of Partial Types , 1994 .

[30]  Stuart M. Shieber,et al.  Principles and Implementation of Deductive Parsing , 1994, J. Log. Program..

[31]  Jens Palsberg,et al.  A type system equivalent to flow analysis , 1995, TOPL.

[32]  Jeffrey D. Ullman,et al.  A survey of deductive database systems , 1995, J. Log. Program..

[33]  J. Palsberg Eecient Inference of Object Types , 1995 .

[34]  A type system equivalent to flow analysis , 1995, TOPL.

[35]  Jeffrey D. Ullman,et al.  A Survey of Research in Deductive Database Systems , 1995 .

[36]  Verónica Dahl Special Issue: Computational Linguistics and Logic Programming , 1995, J. Log. Program..

[37]  Jens Palsberg Efficient Inference of Object Types , 1995, Inf. Comput..

[38]  J. Palsberg Efficient Inference of Object Types , 1996 .

[39]  David Scott Warren,et al.  Tabled evaluation with delaying for general logic programs , 1996, JACM.

[40]  K. A. Ross,et al.  Tabled Evaluation with Delaying for General Logic Programs , 1996 .

[41]  Martín Abadi,et al.  A Theory of Objects , 1996, Monographs in Computer Science.

[42]  Andrew W. Appel Modern Compiler Implementation in Java: Basic Techniques , 1997 .

[43]  Andrew W. Appel,et al.  Modern Compiler Implementation in Java , 1997 .

[44]  David A. McAllester,et al.  On the cubic bottleneck in subtyping and flow analysis , 1997, Proceedings of Twelfth Annual IEEE Symposium on Logic in Computer Science.

[45]  Thomas Reps,et al.  Interconveritibility of Set Constraints and Context-Free Language Reachability , 1997, PEPM.

[46]  David A. McAllester,et al.  Linear-time subtransitive control flow analysis , 1997, PLDI '97.

[47]  José Gabriel Pereira Lopes,et al.  Partial Parsing, Deduction and Tabling , 1998, TAPD.

[48]  Alexander Aiken,et al.  Partial online cycle elimination in inclusion constraint graphs , 1998, PLDI.

[49]  Fritz Henglein,et al.  Breaking Through the n3 Barrier: Faster Object Type Inference , 1999, Theory Pract. Object Syst..

[50]  Giorgio Satta,et al.  Efficient Parsing for Bilexical Context-Free Grammars and Head Automaton Grammars , 1999, ACL.

[51]  Raghu Ramakrishnan,et al.  Review - Magic Sets and Other Strange Ways to Implement Logic Programs , 1999, ACM SIGMOD Digit. Rev..

[52]  Harald Ganzinger,et al.  Automated complexity analysis based on ordered resolution , 2001, JACM.

[53]  Vladimir Solmon,et al.  The estimation of stochastic context-free grammars using the Inside-Outside algorithm , 2003 .