Lower Runtime Bounds for Integer Programs

  • F. Frohn
  • M. Naaf
  • J. Hensel
  • M. Brockschmidt
  • J. Giesl
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9706)

Abstract

We 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. 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. We implemented our technique in our tool LoAT and show that it infers non-trivial lower bounds for a large number of examples.

References

  1. 1.
    Albert, E., Genaim, S., Masud, A.N.: On the inference of resource usage upper and lower bounds. ACM Trans. Comput. Logic 14(3), 22:1–22:35 (2013)MathSciNetCrossRefMATHGoogle Scholar
  2. 2.
    Alias, C., Darte, A., Feautrier, P., Gonnord, L.: Multi-dimensional rankings, program termination, and complexity bounds of flowchart programs. In: Cousot, R., Martel, M. (eds.) SAS 2010. LNCS, vol. 6337, pp. 117–133. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  3. 3.
    Alonso-Blas, D.E., Genaim, S.: On the limits of the classical approach to cost analysis. In: Miné, A., Schmidt, D. (eds.) SAS 2012. LNCS, vol. 7460, pp. 405–421. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  4. 4.
    Bagnara, R., Pescetti, A., Zaccagnini, A., Zaffanella, E.: \({\sf PURRS}\): towards computer algebra support for fully automatic worst-case complexity analysis. CoRR abs/cs/0512056 (2005)Google Scholar
  5. 5.
  6. 6.
    Bradley, A.R., Manna, Z., Sipma, H.B.: Linear ranking with reachability. In: Etessami, K., Rajamani, S.K. (eds.) CAV 2005. LNCS, vol. 3576, pp. 491–504. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  7. 7.
    Brockschmidt, M., Cook, B., Fuhs, C.: Better termination proving through cooperation. In: Sharygina, N., Veith, H. (eds.) CAV 2013. LNCS, vol. 8044, pp. 413–429. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  8. 8.
    Brockschmidt, M., Emmes, F., Falke, S., Fuhs, C., Giesl, J.: Alternating runtime and size complexity analysis of integer programs. In: Ábrahám, E., Havelund, K. (eds.) TACAS 2014 (ETAPS). LNCS, vol. 8413, pp. 140–155. Springer, Heidelberg (2014)CrossRefGoogle Scholar
  9. 9.
    Carbonneaux, Q., Hoffmann, J., Shao, Z.: Compositional certified resource bounds. In: Grove, D., Blackburn, S. (eds.) PLDI 2015, pp. 467–478, ACM (2015)Google Scholar
  10. 10.
    de Moura, L., Bjørner, N.S.: \(\sf Z3\): an efficient SMT solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  11. 11.
    Debray, S., López-García, P., Hermenegildo, M.V., Lin, N.: Lower bound cost estimation for logic programs. In: Maluszynski, J. (ed.) ILPS 1997, pp. 291–305. MIT Press (1997)Google Scholar
  12. 12.
    Falke, S., Kapur, D., Sinz, C.: Termination analysis of imperative programs using bitvector arithmetic. In: Joshi, R., Müller, P., Podelski, A. (eds.) VSTTE 2012. LNCS, vol. 7152, pp. 261–277. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  13. 13.
    Farzan, A., Kincaid, Z.: Compositional recurrence analysis. In: Kaivola, R., Wahl, T. (eds.) FMCAD 2015, pp. 57–64. IEEE (2015)Google Scholar
  14. 14.
    Flores-Montoya, A., Hähnle, R.: Resource analysis of complex programs with cost equations. In: Garrigue, J. (ed.) APLAS 2014. LNCS, vol. 8858, pp. 275–295. Springer, Heidelberg (2014)Google Scholar
  15. 15.
    Frohn, F., Giesl, J., Emmes, F., Ströder, T., Aschermann, C., Hensel, J.: Inferring lower bounds for runtime complexity. In: Fernández, M. (ed.) RTA 2015. LIPIcs, vol. 36, pp. 334–349. Dagstuhl Publishing (2015)Google Scholar
  16. 16.
    Frohn, F., Naaf, M., Hensel, J., Brockschmidt, M., Giesl, J.: Proofs and empirical evaluation of “Lower Runtime Bounds for Integer Programs” (2016). http://aprove.informatik.rwth-aachen.de/eval/integerLower/
  17. 17.
    Gonnord, L., Halbwachs, N.: Combining widening and acceleration in linear relation analysis. In: Yi, K. (ed.) SAS 2006. LNCS, vol. 4134, pp. 144–160. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  18. 18.
    Hofbauer, D., Lautemann, C.: Termination proofs and the length of derivations. In: Dershowitz, N. (ed.) Rewriting Techniques and Applications. LNCS, vol. 355, pp. 167–177. Springer, Heidelberg (1989)CrossRefGoogle Scholar
  19. 19.
    Hoffmann, J., Aehlig, K., Hofmann, M.: Multivariate amortized resource analysis. ACM Trans. Program. Lang. Syst. 34(3), 14:1–14:62 (2012)CrossRefMATHGoogle Scholar
  20. 20.
    Jeannet, B., Miné, A.: \({\sf APRON}\): a library of numerical abstract domains for static analysis. In: Bouajjani, A., Maler, O. (eds.) CAV 2009. LNCS, vol. 5643, pp. 661–667. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  21. 21.
    Jeannet, B., Schrammel, P., Sankaranarayanan, S.: Abstract acceleration of general linear loops. ACM SIGPLAN Not. 49(1), 529–540 (2014)MATHGoogle Scholar
  22. 22.
    Kroening, D., Lewis, M., Weissenbacher, G.: Under-approximating loops in C programs for fast counterexample detection. Form. Meth. Sys. Des. 47(1), 75–92 (2015)CrossRefMATHGoogle Scholar
  23. 23.
  24. 24.
    Madhukar, K., Wachter, B., Kroening, D., Lewis, M., Srivas, M.K.: Accelerating invariant generation. In: Kaivola, R., Wahl, T. (eds.) FMCAD 2015, pp. 105–111. IEEE (2015)Google Scholar
  25. 25.
    Podelski, A., Rybalchenko, A.: A complete method for the synthesis of linear ranking functions. In: Steffen, B., Levi, G. (eds.) VMCAI 2004. LNCS, vol. 2937, pp. 239–251. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  26. 26.
    Sinn, M., Zuleger, F., Veith, H.: A simple and scalable static analysis for bound analysis and amortized complexity analysis. In: Biere, A., Bloem, R. (eds.) CAV 2014. LNCS, vol. 8559, pp. 745–761. Springer, Heidelberg (2014)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2016

Authors and Affiliations

  • F. Frohn
    • 1
  • M. Naaf
    • 1
  • J. Hensel
    • 1
  • M. Brockschmidt
    • 2
  • J. Giesl
    • 1
  1. 1.LuFG Informatik 2RWTH Aachen UniversityAachenGermany
  2. 2.Microsoft ResearchCambridgeUK

Personalised recommendations