A flow calculus of mwp-bounds for complexity analysis

We present a method for certifying that the values computed by an imperative program will be bounded by polynomials in the program's inputs. To this end, we introduce <i>mwp</i>-matrices and define a semantic relation ⊧ C : <i>M</i>, where C is a program and <i>M</i> is an <i>mwp</i>-matrix. It follows straightforwardly from our definitions that there exists <i>M</i> such that ⊧ C : <i>M</i> holds iff every value computed by C is bounded by a polynomial in the inputs. Furthermore, we provide a syntactical proof calculus and define the relation ⊢ C : <i>M</i> to hold iff there exists a derivation in the calculus where C : <i>M</i> is the bottom line. We prove that ⊢ C : <i>M</i> implies ⊧ C : <i>M</i>. By means of exhaustive proof search, an algorithm can decide if there exists <i>M</i> such that the relation ⊢ C : <i>M</i> holds, and thus, our results yield a computational method.

[1]  Lars Kristiansen,et al.  The Garland Measure and Computational Complexity of Stack Programs , 2003, ICC@LICS.

[2]  Lars Kristiansen,et al.  Neat function algebraic characterizations of logspace and linspace , 2005, computational complexity.

[3]  Paul J. Voda,et al.  Programming Languages Capturing Complexity Classes , 2005, Nord. J. Comput..

[4]  Henning Wunderlich,et al.  Certifying Polynomial Time and Linear/Polynomial Space for Imperative Programs , 2006, SIAM J. Comput..

[5]  Neil D. Jones The expressive power of higher-order types or, life without CONS , 2001, J. Funct. Program..

[6]  Riemannian Manifolds,et al.  SOME EXAMPLES OF , 1984 .

[7]  Bernard Carré,et al.  Information-flow and data-flow analysis of while-programs , 1985, TOPL.

[8]  Lars Kristiansen Complexity-Theoretic Hierarchies Induced by Fragments of Gödel’s T , 2007, Theory of Computing Systems.

[9]  Stephen A. Cook,et al.  A new recursion-theoretic characterization of the polytime functions , 1992, STOC '92.

[10]  Jean-Yves Marion,et al.  Resource control of object-oriented programs , 2007, ArXiv.

[11]  Karl-Heinz Niggl,et al.  Control structures in programs and computational complexity , 2005, Ann. Pure Appl. Log..

[12]  Guillaume Bonfante,et al.  Quasi-interpretations a way to control resources , 2011, Theor. Comput. Sci..

[13]  Martin Hofmann Programming languages capturing complexity classes , 2000, SIGA.

[14]  Neil D. Jones,et al.  The size-change principle for program termination , 2001, POPL '01.

[15]  Lars Kristiansen,et al.  On the computational complexity of imperative programming languages , 2004, Theor. Comput. Sci..

[16]  Neil D. Jones,et al.  Termination Analysis of the Untyped lamba-Calculus , 2004, RTA.

[17]  Martin Hofmann,et al.  Linear types and non-size-increasing polynomial time computation , 1999, Proceedings. 14th Symposium on Logic in Computer Science (Cat. No. PR00158).

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

[19]  LeeChin Soon,et al.  The size-change principle for program termination , 2001 .

[20]  Harold Simmons,et al.  The realm of primitive recursion , 1988, Arch. Math. Log..

[21]  Carl Christian Frederiksen Automatic Runtime Analysis for First Order Functional Programs , 2002 .

[22]  Neil D. Jones,et al.  Termination analysis of the untyped λ-calculus , 2004 .

[23]  Alfred V. Aho,et al.  The Design and Analysis of Computer Algorithms , 1974 .

[24]  Flemming Nielson,et al.  Abstract interpretation: a semantics-based tool for program analysis , 1995, LICS 1995.

[25]  Daniel Leivant,et al.  Intrinsic Theories and Computational Complexity , 1994, LCC.

[26]  Neil D. Jones,et al.  LOGSPACE and PTIME Characterized by Programming Languages , 1999, Theor. Comput. Sci..

[27]  Jean-Yves Marion,et al.  Resource Analysis by Sup-interpretation , 2006, FLOPS.

[28]  Paul J. Voda,et al.  Complexity classes and fragments of C , 2003, Inf. Process. Lett..