Lower Bounds for Runtime Complexity of Term Rewriting

We present the first approach to deduce lower bounds for (worst-case) runtime complexity of term rewrite systems (TRSs) automatically. Inferring lower runtime bounds is useful to detect bugs and to complement existing methods that compute upper complexity bounds. Our approach is based on two techniques: the induction technique generates suitable families of rewrite sequences and uses induction proofs to find a relation between the length of a rewrite sequence and the size of the first term in the sequence. The loop detection technique searches for “decreasing loops”. Decreasing loops generalize the notion of loops for TRSs, and allow us to detect families of rewrite sequences with linear, exponential, or infinite length. We implemented our approach in the tool AProVE and evaluated it by extensive experiments.

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

[2]  Martin Hofmann,et al.  Amortised Resource Analysis and Typed Polynomial Interpretations , 2014, RTA-TLCA.

[3]  Christian von Essen,et al.  Automated Termination Analysis of Java Bytecode by Term Rewriting , 2010, RTA.

[4]  Dieter Hofbauer,et al.  Termination Proofs for String Rewriting Systems via Inverse Match-Bounds , 2005, Journal of Automated Reasoning.

[5]  Jürgen Giesl,et al.  Automated termination proofs for haskell by term rewriting , 2011, TOPL.

[6]  Christopher Lynch,et al.  Basic Syntactic Mutation , 2002, CADE.

[7]  Dieter Hofbauer,et al.  Termination Proofs and the Length of Derivations (Preliminary Version) , 1989, RTA.

[8]  Jürgen Giesl,et al.  Inferring Lower Bounds for Runtime Complexity , 2015, RTA.

[9]  Johannes Waldmann Matchbox: A Tool for Match-Bounded String Rewriting , 2004, RTA.

[10]  Jürgen Giesl,et al.  Analyzing Program Termination and Complexity Automatically with AProVE , 2016, Journal of Automated Reasoning.

[11]  Robert S. Boyer,et al.  A computational logic handbook , 1979, Perspectives in computing.

[12]  Jürgen Giesl,et al.  Proving Non-looping Non-termination Automatically , 2012, IJCAR.

[13]  Étienne Payet,et al.  Loop detection in term rewriting using the eliminating unfoldings , 2008, Theor. Comput. Sci..

[14]  Donald E. Knuth,et al.  Johann Faulhaber and sums of powers , 1992, math/9207222.

[15]  Hans Zantema Termination of String Rewriting Proved Automatically , 2005, Journal of Automated Reasoning.

[16]  Georg Moser,et al.  Automated Complexity Analysis Based on the Dependency Pair Method , 2008, IJCAR.

[17]  Georg Moser,et al.  The Derivational Complexity Induced by the Dependency Pair Method , 2009, RTA.

[18]  Tobias Nipkow,et al.  Term rewriting and all that , 1998 .

[19]  Nikolaj Bjørner,et al.  Z3: An Efficient SMT Solver , 2008, TACAS.

[20]  Johannes Waldmann Automatic Termination , 2009, RTA.

[21]  Philip K. Hooper The undecidability of the Turing machine immortality problem , 1966, Journal of Symbolic Logic.

[22]  Dieter Hofbauer,et al.  Finding and Certifying Loops , 2009, SOFSEM.

[23]  Elvira Albert,et al.  On the Inference of Resource Usage Upper and Lower Bounds , 2013, TOCL.

[24]  Hans Zantema,et al.  Termination of Term Rewriting: Interpretation and Type Elimination , 1994, J. Symb. Comput..

[25]  Jürgen Giesl,et al.  Analyzing Innermost Runtime Complexity of Term Rewriting by Dependency Pairs , 2013, Journal of Automated Reasoning.

[26]  Jürgen Giesl,et al.  Proving and Disproving Termination of Higher-Order Functions , 2005, FroCoS.

[27]  Harald Zankl,et al.  Modular Complexity Analysis for Term Rewriting , 2014, Log. Methods Comput. Sci..

[28]  Jürgen Giesl,et al.  Lower Runtime Bounds for Integer Programs , 2016, IJCAR.

[29]  Georg Moser,et al.  TcT: Tyrolean Complexity Tool , 2016, TACAS.

[30]  Georg Moser,et al.  A combination framework for complexity , 2013, Inf. Comput..

[31]  Jürgen Giesl,et al.  Proving Termination by Dependency Pairs and Inductive Theorem Proving , 2011, Journal of Automated Reasoning.