Interpolation-Based Height Analysis for Improving a Recurrence Solver

  • Manuel Montenegro
  • Olha Shkaravska
  • Marko van Eekelen
  • Ricardo Peña
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7177)

Abstract

The COSTA system infers resource consumption bounds from Java bytecode using an internal recurrence solver PUBS. This paper suggests an improvement of the COSTA system, such that it can solve a larger number of recurrences. The idea is to replace one of its static analyses, the ranking function analysis, by another kind of analysis, height analysis, in such a way that polynomial bounds of any degree may be inferred instead of just linear expressions. The work can be seen as an application of some polynomial interpolation techniques used by some of the authors in prior analyses. Finding a way to choose proper test nodes is the key to the solution presented in this paper.

Keywords

Recurrence Relation Ranking Function Polynomial Interpolation Interpolation Problem Recursive Call 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Albert, E., Arenas, P., Genaim, S., Puebla, G., Zanardini, D.: COSTA: Design and Implementation of a Cost and Termination Analyzer for Java Bytecode. In: de Boer, F.S., Bonsangue, M.M., Graf, S., de Roever, W.-P. (eds.) FMCO 2007. LNCS, vol. 5382, pp. 113–132. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  2. 2.
    Albert, E., Arenas, P., Genaim, S., Puebla, G.: Closed-form upper bounds in static cost analysis. J. Autom. Reasoning 46(2), 161–203 (2011)MathSciNetMATHCrossRefGoogle Scholar
  3. 3.
    Albert, E., Genaim, S., Gómez-Zamalloa, M.: Parametric inference of memory requirements for garbage collected languages. In: Vitek, J., Lea, D. (eds.) ISMM, pp. 121–130. ACM (2010)Google Scholar
  4. 4.
    Albert, E., Genaim, S., Masud, A.N.: More Precise Yet Widely Applicable Cost Analysis. In: Jhala, R., Schmidt, D. (eds.) VMCAI 2011. LNCS, vol. 6538, pp. 38–53. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  5. 5.
    Bagnara, R., Zaccagnini, A., Zolo, T.: The automatic solution of recurrence relations. I. Linear recurrences of finite order with constant coefficients. Quaderno 334, Dipartimento di Matematica, Università di Parma, Italy (2003), http://www.cs.unipr.it/Publications/
  6. 6.
    Bagnara, R., Ricci, E., Zaffanella, E., Hill, P.M.: Possibly Not Closed Convex Polyhedra and the Parma Polyhedra Library. In: Hermenegildo, M.V., Puebla, G. (eds.) SAS 2002. LNCS, vol. 2477, pp. 213–229. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  7. 7.
    Brown, C.W.: QEPCAD: Quantifier Elimination by Partial Cylindrical Algebraic Decomposition (2004), http://www.cs.usna.edu/qepcad/B/QEPCAD.html
  8. 8.
    Chui, C.K., Lai, M.J.: Vandermonde determinants and lagrange interpolation in R s. In: Nonlinear and Convex Analysis, Proceedings in Honor of Ky Fan, pp. 23–35. Marcel Dekker Inc., N.Y. (1987)Google Scholar
  9. 9.
    Collins, G.E.: Quantifier Elimination for Real Closed Fields by Cylindrical Algebraic Decomposition. In: Brakhage, H. (ed.) GI-Fachtagung 1975. LNCS, vol. 33, pp. 134–183. Springer, Heidelberg (1975)Google Scholar
  10. 10.
    Cooper, D.C.: Theorem proving in arithmetic without multiplication. Machine Intelligence 7, 91–100 (1972)MATHGoogle Scholar
  11. 11.
    Dolzmann, A., Sturm, T.: Redlog user manual. Tech. Rep. MIP-9905, FMI, Universität Passau, edition 2.0 for Version 2.0 (1999)Google Scholar
  12. 12.
    van Eekelen, M., Shkaravska, O., van Kesteren, R., Jacobs, B., Poll, E., Smetsers, S.: AHA: Amortized Heap space usage Analysis. In: Morazán, M. (ed.) Selected Revised Papers of the 8th International Symposium on Trends in Functional Programming (TFP 2007), pp. 36–53. Intellect, New York (2007)Google Scholar
  13. 13.
    Hearn, A.C.: REDUCE. User’s Manual. Version 3.8 (2004)Google Scholar
  14. 14.
    Hoffmann, J., Hofmann, M.: Amortized Resource Analysis with Polynomial Potential. In: Gordon, A.D. (ed.) ESOP 2010. LNCS, vol. 6012, pp. 287–306. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  15. 15.
    Hoffmann, J., Aehlig, K., Hofmann, M.: Multivariate amortized resource analysis. In: Ball, T., Sagiv, M. (eds.) POPL, pp. 357–370. ACM (2011)Google Scholar
  16. 16.
    Hofmann, M., Jost, S.: Static prediction of heap space usage for first-order functional programs. In: Proc. 30th ACM Symp. on Principles of Programming Languages, POPL 2003, pp. 185–197. ACM Press (2003)Google Scholar
  17. 17.
    van Kesteren, R., Shkaravska, O., van Eekelen, M.: Inferring static non-monotonically sized types through testing. In: Proceedings of 16th International Workshop on Functional and (Constraint) Logic Programming (WFLP 2007), Paris, France. ENTCS, vol. 216C, pp. 45–63 (2007)Google Scholar
  18. 18.
    Lucas, S.: Polynomials over the reals in proofs of termination: from theory to practice. RAIRO Theoretical Informatics and Applications 39(3), 547–586 (2005)MathSciNetMATHCrossRefGoogle Scholar
  19. 19.
    Nipkow, T.: Linear quantifier elimination. J. Autom. Reasoning 45(2), 189–212 (2010)MathSciNetMATHCrossRefGoogle Scholar
  20. 20.
    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
  21. 21.
    Shkaravska, O., van Eekelen, M., van Kesteren, R.: Polynomial size analysis of first-order shapely functions. Logical Methods in Computer Science 5(2:10), 1–35 (2009); selected Papers from TLCA 2007Google Scholar
  22. 22.
    Shkaravska, O., van Eekelen, M., Tamalet, A.: Collected Size Semantics for Functional Programs over Lists. In: Scholz, S.-B., Chitil, O. (eds.) IFL 2008. LNCS, vol. 5836, pp. 118–137. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  23. 23.
    Shkaravska, O., van Eekelen, M.C.J.D., van Kesteren, R.: Polynomial size analysis of first-order shapely functions. Logical Methods in Computer Science 5(2) (2009)Google Scholar
  24. 24.
    Shkaravska, O., Kersten, R., van Eekelen, M.: Test-based inference of polynomial loop-bound functions. In: Proceedings of the 8th International Conference on the Principles and Practice of Programming in Java, PPPJ 2010. ACM (2010)Google Scholar
  25. 25.
    Tamalet, A., Shkaravska, O., van Eekelen, M.: Size analysis of algebraic data types. In: Achten, P., Koopman, P., Morazán, M.T. (eds.) Selected Revised Papers of the 9th International Symposium on Trends in Functional Programming (TFP 2008), pp. 33–48. Intellect (2009)Google Scholar
  26. 26.
    Tarski, A.: A Decision Method for Elementary Algebra and Geometry. University of California Press, Berkeley (1948)MATHGoogle Scholar
  27. 27.
    Wegbreit, B.: Mechanical program analysis. Commun. ACM 18(9), 528–539 (1975)MathSciNetMATHCrossRefGoogle Scholar
  28. 28.
    Weispfenning, V.: The complexity of linear problems in fields. J. Symb. Comput. 5(1/2), 3–27 (1988)MathSciNetMATHCrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Manuel Montenegro
    • 1
  • Olha Shkaravska
    • 2
  • Marko van Eekelen
    • 2
    • 3
  • Ricardo Peña
    • 1
  1. 1.Universidad Complutense MadridSpain
  2. 2.Radboud University NijmegenThe Netherlands
  3. 3.Open University of the NetherlandsThe Netherlands

Personalised recommendations