Abstract
We present a technique to infer lower bounds on the worst-case runtime complexity of integer programs, where in contrast to earlier work, our approach is not restricted to tail-recursion. Our technique constructs symbolic representations of program executions using a framework for iterative, under-approximating program simplification. The core of this simplification is a method for (under-approximating) program acceleration based on recurrence solving and a variation of ranking functions. Afterwards, we deduce asymptotic lower bounds from the resulting simplified programs using a special-purpose calculus and an SMT encoding. We implemented our technique in our tool LoAT and show that it infers non-trivial lower bounds for a large class of examples.
- Elvira Albert, Diego E. Alonso-Blas, Puri Arenas, Samir Genaim, and Germán Puebla. 2009. Asymptotic resource usage bounds. In APLAS’09 (LNCS 5904). 294--310.Google Scholar
- Elvira Albert, Puri Arenas, Samir Genaim, and Germán Puebla. 2011. Closed-form upper bounds in static cost analysis. J. Autom. Reas. 46, 2 (2011), 161--203.Google Scholar
Digital Library
- Elvira Albert, Puri Arenas, Samir Genaim, Germán Puebla, and Damiano Zanardini. 2012. Cost analysis of object-oriented bytecode programs. Theor. Comput. Sci. 413, 1 (2012), 142--159.Google Scholar
Digital Library
- Elvira Albert, Samir Genaim, and Abu N. Masud. 2013. On the inference of resource usage upper and lower bounds. ACM Trans. Comput. Log. 14, 3 (2013), 22:1--22:35.Google Scholar
Digital Library
- Elvira Albert, Miquel Bofill, Cristina Borralleras, Enrique Martin-Martin, and Albert Rubio. 2019. Resource analysis driven by (conditional) termination proofs. Theor. Pract. Log. Prog. 19, 5–6 (2019), 722--739.Google Scholar
- Christophe Alias, Alain Darte, Paul Feautrier, and Laure Gonnord. 2010. Multi-dimensional rankings, program termination, and complexity bounds of flowchart programs. In SAS’10 (LNCS 6337). 117--133.Google Scholar
- Diego E. Alonso-Blas and Samir Genaim. 2012. On the limits of the classical approach to cost analysis. In SAS’12 (LNCS 7460). 405--421.Google Scholar
- Roberto Bagnara, Andrea Pescetti, Alessandro Zaccagnini, and Enea Zaffanella. 2005. PURRS: Towards computer algebra support for fully automatic worst-case complexity analysis. CoRR abs/cs/0512056 (2005).Google Scholar
- Amir M. Ben-Amram and Samir Genaim. 2014. Ranking functions for linear-constraint loops. J. ACM 61, 4 (2014), 26:1--26:55.Google Scholar
Digital Library
- Régis Blanc, Thomas A. Henzinger, Thibaud Hottelier, and Laura Kovács. 2010. ABC: Algebraic bound computation for loops. In LPAR’10 (LNCS 6355). 103--118.Google Scholar
- Marius Bozga, Codruta Gîrlea, and Radu Iosif. 2009. Iterating octagons. In TACAS’09 (LNCS 5505). 337--351.Google Scholar
- Marius Bozga, Radu Iosif, and Filip Konecný. 2010. Fast acceleration of ultimately periodic relations. In CAV’10 (LNCS 6174). 227--242.Google Scholar
- Aaron R. Bradley, Zohar Manna, and Henny B. Sipma. 2005. Linear ranking with reachability. In CAV’05 (LNCS 3576). 491--504.Google Scholar
- Marc Brockschmidt, Fabian Emmes, Stephan Falke, Carsten Fuhs, and Jürgen Giesl. 2016. Analyzing runtime and size complexity of integer programs. ACM Trans. Prog. Lang. Syst. 38, 4 (2016), 13:1--13:50.Google Scholar
Digital Library
- Jacob Burnim, Sudeep Juvekar, and Koushik Sen. 2009. WISE: Automated test generation for worst-case complexity. In ICSE’09. 463--473.Google Scholar
- Rod M. Burstall and John Darlington. 1977. A transformation system for developing recursive programs. J. ACM 24, 1 (1977), 44--67.Google Scholar
Digital Library
- Pavel Cadek, Clemens Danninger, Moritz Sinn, and Florian Zuleger. 2018. Using loop bound analysis for invariant generation. In FMCAD’18. 1--9.Google Scholar
- Peter Cameron. 2017. Polynomials Taking Integer Values. Retrieved from https://cameroncounts.wordpress.com/2017/01/31/polynomials-taking-integer-values/.Google Scholar
- Quentin Carbonneaux, Jan Hoffmann, and Zhong Shao. 2015. Compositional certified resource bounds. In PLDI’15. 467--478.Google Scholar
- Quentin Carbonneaux, Jan Hoffmann, Thomas W. Reps, and Zhong Shao. 2017. Automated resource analysis with Coq proof objects. In CAV’17 (LNCS 10427). 64--85.Google Scholar
- Leonardo de Moura and Nikolaj Bjørner. 2008. Z3: An efficient SMT solver. In TACAS’08 (LNCS 4963). 337--340.Google Scholar
- Saumya Debray, Pedro López-García, Manuel V. Hermenegildo, and Nai-Wei Lin. 1997. Lower bound cost estimation for logic programs. In ILPS’97. 291--305.Google Scholar
- Complexity Analysis-Based Guaranteed Execution. 2015. Retrieved from https://www.draper.com/news-releases/drapers-cage-could-spot-code-vulnerable-denial-service-attacks.Google Scholar
- Stephan Falke, Deepak Kapur, and Carsten Sinz. 2012. Termination analysis of imperative programs using bitvector arithmetic. In VSTTE’12 (LNCS 7152). 261--277.Google Scholar
- Azadeh Farzan and Zachary Kincaid. 2015. Compositional recurrence analysis. In FMCAD’15. 57--64.Google Scholar
- Antonio Flores-Montoya and Reiner Hähnle. 2014. Resource analysis of complex programs with cost equations. In APLAS’14 (LNCS 8858). 275--295.Google Scholar
- Antonio Flores-Montoya. 2016. Upper and lower amortized cost bounds of programs expressed as cost relations. In FM’16 (LNCS 9995). 254--273.Google Scholar
- Space/Time Analysis for Cybersecurity (STAC). 2015. Retrieved from http://www.darpa.mil/program/space-time-analysis-for-cybersecurity.Google Scholar
- Florian Frohn, Matthias Naaf, Jera Hensel, Marc Brockschmidt, and Jürgen Giesl. 2016. Lower runtime bounds for integer programs. In IJCAR’16 (LNAI 9706). 550--567.Google Scholar
- Florian Frohn, Jürgen Giesl, Jera Hensel, Cornelius Aschermann, and Thomas Ströder. 2017. Lower bounds for runtime complexity of term rewriting. J. Autom. Reas. 59, 1 (2017), 121--163.Google Scholar
Digital Library
- Florian Frohn and Jürgen Giesl. 2019. Termination of triangular integer loops is decidable. In CAV’19 (LNCS 11562). 426--444.Google Scholar
- Florian Frohn and Jürgen Giesl. 2019. Proving non-termination via loop acceleration. In FMCAD’19. 221--230.Google Scholar
- Florian Frohn, Matthias Naaf, Marc Brockschmidt, and Jürgen Giesl. 2020. Empirical Evaluation of “Inferring Lower Runtime Bounds for Integer Programs.” Retrieved from https://aprove-developers.github.io/its-lowerbounds-journal.Google Scholar
- Hongfei Fu and Krishnendu Chatterjee. 2019. Termination of nondeterministic probabilistic programs. In VMCAI’19 (LNCS 11388). 468--490.Google Scholar
- Pierre Ganty, Radu Iosif, and Filip Konecný. 2017. Underapproximation of procedure summaries for integer programs. STTT 19, 5 (2017), 565--584.Google Scholar
Digital Library
- Jürgen Giesl, Peter Giesl, and Marcel Hark. 2019. Computing expected runtimes for constant probability programs. In CADE’19 (LNAI 11716). 269--286.Google Scholar
- Jürgen Giesl, Albert Rubio, Christian Sternagel, Johannes Waldmann, and Akihisa Yamada. 2019. The termination and complexity competition. In TACAS’19 (LNCS 11429). 156--166.Google Scholar
- Laure Gonnord and Nicolas Halbwachs. 2006. Combining widening and acceleration in linear relation analysis. In SAS’06 (LNCS 4134). 144--160.Google Scholar
- Sumit Gulwani, Krishna K. Mehra, and Trishul M. Chilimbi. 2009. SPEED: Precise and efficient static estimation of program computational complexity. In POPL’09. 127--139.Google Scholar
- Marcel Hark, Benjamin Lucien Kaminski, Jürgen Giesl, and Joost-Pieter Katoen. 2020. Aiming low is harder—Inductive proof rules for lower bounds on weakest preexpectations in probabilistic program verification. PACMPL 4, POPL (2020), 37:1--37:28.Google Scholar
- André Heck. 1996. Introduction to Maple (2nd ed.). Springer.Google Scholar
- Jera Hensel, Jürgen Giesl, Florian Frohn, and Thomas Ströder. 2018. Termination and complexity analysis for programs with bitvector arithmetic by symbolic execution. J. Log. Algor. Meth. Prog. 97 (2018), 105--130.Google Scholar
Cross Ref
- Nao Hirokawa and Georg Moser. 2008. Automated complexity analysis based on the dependency pair method. In IJCAR’08 (LNAI 5195). 364--379.Google Scholar
- Dieter Hofbauer and Clemens Lautemann. 1989. Termination proofs and the length of derivations. In RTA’89 (LNCS 355). 167--177.Google Scholar
- Jan Hoffmann, Klaus Aehlig, and Martin Hofmann. 2012. Multivariate amortized resource analysis. ACM Trans. Prog. Lang. Syst. 34, 3 (2012), 14:1--14:62.Google Scholar
Digital Library
- Jan Hoffmann and Zhong Shao. 2015. Type-based amortized resource analysis with integers and arrays. J. Funct. Prog. 25 (2015).Google Scholar
- Jan Hoffmann, Ankush Das, and Shu-Chun Weng. 2017. Towards automatic resource bound analysis for OCaml. In POPL’17. 359--373.Google Scholar
- Bertrand Jeannet, Peter Schrammel, and Sriram Sankaranarayanan. 2014. Abstract acceleration of general linear loops. In POPL’14. 529--540.Google Scholar
- KoAT Benchmarks 2014. Retrieved from https://github.com/s-falke/kittel-koat/tree/master/koat-evaluation/examples.Google Scholar
- Daniel Kroening, Matt Lewis, and Georg Weissenbacher. 2015. Under-approximating loops in C programs for fast counterexample detection. Form. Meth. Syst. Des. 47, 1 (2015), 75--92.Google Scholar
Digital Library
- Daniel Larraz, Albert Oliveras, Enric Rodríguez-Carbonell, and Albert Rubio. 2013. Proving termination of imperative programs using Max-SMT. In FMCAD’13. 218--225.Google Scholar
- LoAT. 2019. Retrieved from https://github.com/aprove-developers/LoAT.Google Scholar
- Kumar Madhukar, Björn Wachter, Daniel Kroening, Matt Lewis, and Mandayam K. Srivas. 2015. Accelerating invariant generation. In FMCAD’15. 105--111.Google Scholar
- Annabelle McIver and Carroll Morgan. 2005. Abstraction, Refinement and Proof for Probabilistic Systems. Springer.Google Scholar
- Matthias Naaf, Florian Frohn, Marc Brockschmidt, Carsten Fuhs, and Jürgen Giesl. 2017. Complexity analysis for term rewriting by integer transition systems. In FroCoS’17 (LNAI 10483). 132--150.Google Scholar
- Andreas Podelski and Andrey Rybalchenko. 2004. A complete method for the synthesis of linear ranking functions. In VMCAI’04 (LNCS 2937). 239--251.Google Scholar
- Moritz Sinn, Florian Zuleger, and Helmuth Veith. 2017. Complexity and resource bound analysis of imperative programs using difference constraints. J. Autom. Reas. 59, 1 (2017), 3--45.Google Scholar
Digital Library
- Akhilesh Srikanth, Burak Sahin, and William R. Harris. 2017. Complexity verification using guided theorem enumeration. In POPL’17. 639--652.Google Scholar
- Jan Strejcek and Marek Trtík. 2012. Abstracting path conditions. In ISSTA’12. 155--165.Google Scholar
- Di Wang and Jan Hoffmann. 2019. Type-guided worst-case input generation. PACMPL 3, POPL (2019), 13:1--13:30.Google Scholar
- Stephen Wolfram. 1992. Mathematica: A system for doing mathematics by computer. SIAM Rev. 34, 3 (1992), 519--522.Google Scholar
Cross Ref
Index Terms
Inferring Lower Runtime Bounds for Integer Programs
Recommendations
Analyzing Runtime and Size Complexity of Integer Programs
We present a modular approach to automatic complexity analysis of integer programs. Based on a novel alternation between finding symbolic time bounds for program parts and using these to infer bounds on the absolute values of program variables, we can ...
Lower Runtime Bounds for Integer Programs
Proceedings of the 8th International Joint Conference on Automated Reasoning - Volume 9706We present a technique to infer lower bounds on the worst-case runtime complexity of integer programs. To this end, we construct symbolic representations of program executions using a framework for iterative, under-approximating program simplification. ...
Lower bounds for algebraic computation trees with integer inputs
SFCS '89: Proceedings of the 30th Annual Symposium on Foundations of Computer ScienceA proof is given of a general theorem showing that for certain sets W a certain topological lower bound is valid in the algebraic computation tree model, even if the inputs are restricted to be integers. The theorem can be used to prove tight lower ...






Comments