Abstract
We present a new method to infer upper bounds on the innermost runtime complexity of term rewrite systems (TRSs), which benefits from recent advances on complexity analysis of integer transition systems (ITSs). To this end, we develop a transformation from TRSs to a generalized notion of ITSs with (possibly non-tail) recursion. To analyze their complexity, we introduce a modular technique which allows us to use existing tools for standard ITSs in order to infer complexity bounds for our generalized ITSs. The key idea of our technique is a summarization method that allows us to analyze components of the transition system independently. We implemented our contributions in the tool AProVE, and our experiments show that one can now infer bounds for significantly more TRSs than with previous state-of-the-art tools for term rewriting.
Supported by DFG grant GI 274/6-1 and the Air Force Research Laboratory (AFRL).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
- 2.
Termination Problems Data Base, the collection of examples used at the annual Termination and Complexity Competition, see http://termination-portal.org.
- 3.
- 4.
References
Albert, E., Arenas, P., Genaim, S., Puebla, G.: Closed-form upper bounds in static cost analysis. J. Autom. Reasoning 46(2), 161–203 (2011)
Albert, E., Arenas, P., Genaim, S., Puebla, G., Zanardini, D.: Cost analysis of object-oriented bytecode programs. Theor. Comput. Sc. 413(1), 142–159 (2012)
Albert, E., Genaim, S., Gutièrrez, R.: A transformational approach to resource analysis with typed-norms. In: Gupta, G., Peña, R. (eds.) LOPSTR 2013. LNCS, vol. 8901, pp. 38–53. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-14125-1_3
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). doi:10.1007/978-3-642-15769-1_8
AProVE. https://aprove-developers.github.io/trs_complexity_via_its/
Avanzini, M., Felgenhauer, B.: Type introduction for runtime complexity analysis. In: WST 2014, pp. 1–5 (2014). http://www.easychair.org/smart-program/VSL2014/WST-proceedings.pdf
Avanzini, M., Moser, G., Schaper, M.: TcT: Tyrolean complexity tool. In: Chechik, M., Raskin, J.F. (eds.) TACAS 2016. LNCS, vol. 9636, pp. 407–423. Springer, Berlin, Heidelberg (2016). https://doi.org/10.1007/978-3-662-49674-9_24
Avanzini, M., Moser, G.: A combination framework for complexity. Inform. Comput. 248, 22–55 (2016)
Baader, F., Nipkow, T.: Term Rewriting and All That. Cambridge U. Press, Cambridge (1998)
Baillot, P., Dal Lago, U., Moyen, J.Y.: On quasi-interpretations, blind abstractions and implicit complexity. Math. Struct. Compt. Sci. 22(4), 549–580 (2012)
Blanc, R., Henzinger, T.A., Hottelier, T., Kovàcs, L.: ABC: Algebraic bound computation for loops. In: Clarke, E.M., Voronkov, A. (eds.) LPAR 2010. LNCS, vol. 6355, pp. 103–118. Springer, Berlin, Heidelberg (2010). https://doi.org/10.1007/978-3-642-17511-4_7
Bonfante, G., Cichon, A., Marion, J.Y., Touzet, H.: Algorithms with polynomial interpretation termination proof. J. Funct. Program. 11(1), 33–53 (2001)
Brockschmidt, M., Emmes, F., Falke, S., Fuhs, C., Giesl, J.: Analyzing runtime and size complexity of integer programs. ACM TOPLAS 38(4), 13 (2016)
Carbonneaux, Q., Hoffmann, J., Shao, Z.: Compositional certified resource bounds. In: PLDI 2015, pp. 467–478 (2015)
Debray, S., Lin, N.: Cost analysis of logic programs. TOPLAS 15(5), 826–875 (1993)
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, Cham (2014). https://doi.org/10.1007/978-3-319-12736-1_15
Flores-Montoya, A.: Upper and lower amortized cost bounds of programs expressed as cost relations. In: Fitzgerald, J., Heitmeyer, C., Gnesi, S., Philippou, A. (eds.) FM 2016. LNCS, vol. 9995, pp. 254–273. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-48989-6_16
Frohn, F., Naaf, M., Hensel, J., Brockschmidt, M., Giesl, J.: Lower runtime bounds for integer programs. In: Olivetti, N., Tiwari, A. (eds.) IJCAR 2016. LNCS, vol. 9706, pp. 550–567. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-40229-1_37
Frohn, F., Giesl, J.: Analyzing runtime complexity via innermost runtime complexity. In: LPAR 2017, pp. 249–268 (2017)
Frohn, F., Giesl, J., Hensel, J., Aschermann, C., Ströder, T.: Lower bounds for runtime complexity of term rewriting. J. Autom. Reasoning 59(1), 121–163 (2017)
Fuhs, C., Giesl, J., Parting, M., Schneider-Kamp, P., Swiderski, S.: Proving termination by dep. pairs and inductive theorem proving. JAR 47(2), 133–160 (2011)
Giesl, J., Aschermann, C., Brockschmidt, M., Emmes, F., Frohn, F., Fuhs, C., Hensel, J., Otto, C., Plücker, M., Schneider-Kamp, P., Ströder, T., Swiderski, S., Thiemann, R.: Analyzing program termination and complexity automatically with AProVE. J. Autom. Reasoning 58, 3–31 (2017)
Gulwani, S.: SPEED: Symbolic complexity bound analysis. In: Bouajjani, A., Maler, O. (eds.) CAV 2009. LNCS, vol. 5643, pp. 51–62. Springer, Berlin, Heidelberg (2009). https://doi.org/10.1007/978-3-642-02658-4_7
Hirokawa, N., Moser, G.: Automated complexity analysis based on the dependency pair method. In: Armando, A., Baumgartner, P., Dowek, G. (eds.) IJCAR 2008. LNCS, vol. 5195, pp. 364–379. Springer, Berlin, Heidelberg (2008). https://doi.org/10.1007/978-3-540-71070-7_32
Hofbauer, D., Lautemann, C.: Termination proofs and the length of derivations. In: Dershowitz, N. (ed.) RTA 1989. LNCS, vol. 355, pp. 167–177. Springer, Heidelberg (1989). doi:10.1007/3-540-51081-8_107
Hoffmann, J.: Types with Potential: Polynomial Resource Bounds via Automatic Amortized Analysis. Ph.D. thesis, Ludwig-Maximilians-University Munich (2011)
Hoffmann, J., Aehlig, K., Hofmann, M.: Multivariate amortized resource analysis. ACM Trans. Program. Lang. Syst. 34(3), 14 (2012)
Hoffmann, J., Das, A., Weng, S.C.: Towards automatic resource bound analysis for OCaml. In: POPL 2017, pp. 359–373 (2017)
Hofmann, M., Moser, G.: Multivariate amortised resource analysis for term rewrite systems. In: TLCA 2015, pp. 241–256 (2015)
Kapur, D., Narendran, P., Zhang, H.: On sufficient completeness and related properties of term rewriting systems. Acta Informatica 24, 395–415 (1987)
Emmanuel, K.: Completeness in data type specifications. In: Caviness, B.F. (ed.) EUROCAL 1985. LNCS, vol. 204, pp. 348–362. Springer, Heidelberg (1985). doi:10.1007/3-540-15984-3_291
Noschinski, L., Emmes, F., Giesl, J.: Analyzing innermost runtime complexity of term rewriting by dependency pairs. J. Autom. Reasoning 51(1), 27–56 (2013)
Serrano, A., López-García, P., Hermenegildo, M.: Resource usage analysis of logic programs via abstract interpretation using sized types. Theory Pract. Logic Program. 14(4–5), 739–754 (2014)
Sinn, M., Zuleger, F., Veith, H.: Complexity and resource bound analysis of imperative programs using difference constraints. J. Autom. Reasoning 59(1), 3–45 (2017)
Wegbreit, B.: Mechanical program analysis. Commun. ACM 18, 528–539 (1975)
Zankl, H., Korp, M.: Modular complexity analysis for term rewriting. Logical Meth. Comput. Sci. 10(1), 1–34 (2014)
Zantema, H.: Termination of term rewriting: interpretation and type elimination. J. Symbol. Comput. 17(1), 23–50 (1994)
Acknowledgments
We thank A. Flores-Montoya for his help with CoFloCo and the anonymous reviewers for their suggestions and comments.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2017 Springer International Publishing AG
About this paper
Cite this paper
Naaf, M., Frohn, F., Brockschmidt, M., Fuhs, C., Giesl, J. (2017). Complexity Analysis for Term Rewriting by Integer Transition Systems. In: Dixon, C., Finger, M. (eds) Frontiers of Combining Systems. FroCoS 2017. Lecture Notes in Computer Science(), vol 10483. Springer, Cham. https://doi.org/10.1007/978-3-319-66167-4_8
Download citation
DOI: https://doi.org/10.1007/978-3-319-66167-4_8
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-66166-7
Online ISBN: 978-3-319-66167-4
eBook Packages: Computer ScienceComputer Science (R0)