Symbolic and Analytic Techniques for Resource Analysis of Java Bytecode

  • David Aspinall
  • Robert Atkey
  • Kenneth MacKenzie
  • Donald Sannella
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6084)


Recent work in resource analysis has translated the idea of amortised resource analysis to imperative languages using a program logic that allows mixing of assertions about heap shapes, in the tradition of separation logic, and assertions about consumable resources. Separately, polyhedral methods have been used to calculate bounds on numbers of iterations in loop-based programs. We are attempting to combine these ideas to deal with Java programs involving both data structures and loops, focusing on the bytecode level rather than on source code.


Resource Usage Resource Analysis Separation Logic Ehrhart Polynomial Resource Annotation 
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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Ahlfors, L.: Complex Analysis. International Series in Pure and Applied Mathematics. McGraw-Hill, New York (1979)zbMATHGoogle Scholar
  2. 2.
    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
  3. 3.
    Atkey, R.: Amortised resource analysis with separation logic. In: Gordon, A.D. (ed.) Programming Languages and Systems. LNCS, vol. 6012, pp. 85–103. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  4. 4.
    Bagnara, R., Hill, P.M., Ricci, E., Zaffanella, E.: Precise widening operators for convex polyhedra. Science of Computer Programming 58(1-2), 28–56 (2005)MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Bagnara, R., Hill, P.M., Zaffanella, E.: The Parma Polyhedra Library: Toward a complete set of numerical abstractions for the analysis and verification of hardware and software systems. Science of Computer Programming 72(1-2), 3–21 (2008)MathSciNetCrossRefGoogle Scholar
  6. 6.
    Bagnara, R., Hill, P.M., Zaffanella, E.: Applications of polyhedral computations to the analysis and verification of hardware and software systems. Theor. Comput. Sci. 410(46), 4672–4691 (2009)MathSciNetCrossRefzbMATHGoogle Scholar
  7. 7.
    Barthe, G., Beringer, L., Crégut, P., Grégoire, B., Hofmann, M., Müller, P., Poll, E., Puebla, G., Stark, I., Vétillard, E.: MOBIUS: Mobility, ubiquity, security — objectives and progress report. In: Montanari, U., Sannella, D., Bruni, R. (eds.) TGC 2006. LNCS, vol. 4661, pp. 10–29. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  8. 8.
    Barvinok, A., Pommersheim, J.E.: An algorithmic theory of lattice points in polyhedra. In: New Perspectives in Algebraic Combinatorics (Berkeley, CA, 1996-1997). Math. Sci. Res. Inst. Publ, vol. 38, pp. 91–147. Cambridge Univ. Press, Cambridge (1999)Google Scholar
  9. 9.
    Beck, M., Robins, S.: Computing the Continuous Discretely. Undergraduate Texts in Mathematics. Springer, Heidelberg (2007)zbMATHGoogle Scholar
  10. 10.
    Beck, M., Sam, S., Woods, K.: Maximal periods of (Ehrhart) quasi-polynomials. J. Combin. Theory Ser. A 115, 517–525 (2008)MathSciNetCrossRefzbMATHGoogle Scholar
  11. 11.
    Berdine, J., Calcagno, C., O’Hearn, P.W.: Symbolic execution with separation logic. In: Yi, K. (ed.) APLAS 2005. LNCS, vol. 3780, pp. 52–68. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  12. 12.
    Braberman, V., Fernández, F., Garbervetsky, D., Yovine, S.: Symbolic prediction of dynamic memory requirements. In: ISMM 2008 (2008)Google Scholar
  13. 13.
    Braberman, V., Garbervetsky, D., Yovine, S.: A static analysis for synthesizing parametric specifications of dynamic memory consumption. Journal of Object Technology 5(5), 31–58 (2006)CrossRefGoogle Scholar
  14. 14.
    Clauss, P.: Counting solutions to linear and nonlinear constraints through Ehrhart polynomials: applications to analyze and transform scientific programs. In: ICS 1996: Proceedings of the 10th International Conference on Supercomputing, Philadelphia, Pennsylvania, United States, pp. 278–285 (1996)Google Scholar
  15. 15.
    Clauss, P., Loechner, V.: Parametric analysis of polyhedral iteration spaces. Journal of VLSI Signal Processing 19, 179–194 (1998)CrossRefGoogle Scholar
  16. 16.
    Cousot, P., Halbwachs, N.: Automatic discovery of linear restraints among variables of a program. In: POPL 1978: Proceedings of the 5th Annual ACM Symposium on Principles of Programming Languages, pp. 84–97. ACM Press, New York (1978)Google Scholar
  17. 17.
    Ehrhart, E.: Sur un problème de géométrie diophantienne linéaire. I. Polyèdres et réseaux. J. Reine Angew. Math. 226, 1–29 (1967)MathSciNetzbMATHGoogle Scholar
  18. 18.
    Ehrhart, E.: Sur un problème de géométrie diophantienne linéaire. II. Systèmes diophantiens linéaires. J. Reine Angew. Math. 227, 25–49 (1967)MathSciNetGoogle Scholar
  19. 19.
    Gulwani, S., Mehra, K.K., Chilimbi, T.M.: SPEED: precise and efficient static estimation of program computational complexity. In: POPL 2009: Proceedings of the 36th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 127–139 (2009)Google Scholar
  20. 20.
    Hoffmann, J., Hofmann, M.: Amortized resource analysis with polynomial potential. In: Gordon, A.D. (ed.) Programming Languages and Systems. LNCS, vol. 6012, pp. 287–306. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  21. 21.
    Hofmann, M., Jost, S.: Static prediction of heap space usage for first-order functional programs. In: POPL 2003: Proceedings of the 30th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 185–197 (2003)Google Scholar
  22. 22.
    Ishtiaq, S., O’Hearn, P.W.: BI as an assertion language for mutable data structures. In: POPL 2001: Proceedings of the 28th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 14–26 (January 2001)Google Scholar
  23. 23.
    Kratsch, D., McConnell, R.M., Mehlhorn, K., Spinrad, J.P.: Certifying algorithms for recognizing interval graphs and permutation graphs. In: SODA 2003: Proceedings of the Fourteenth Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 158–167 (2003)Google Scholar
  24. 24.
    Lengauer, C.: Loop parallelization in the polytope model. In: Best, E. (ed.) CONCUR 1993. LNCS, vol. 715, pp. 398–416. Springer, Heidelberg (1993)Google Scholar
  25. 25.
    Loechner, V., Wilde, D.K.: Parameterized polyhedra and their vertices. Int. J. of Parallel Programming 25, 25–26 (1997)CrossRefGoogle Scholar
  26. 26.
    De Loera, J.A., Hemmecke, R., Tauzer, J., Yoshida, R.: Effective lattice point counting in rational convex polytopes. Journal of Symbolic Computation 38, 1273–1302 (2004)MathSciNetCrossRefzbMATHGoogle Scholar
  27. 27.
    Lokuciejewski, P., Cordes, D., Falk, H., Marwedel, P.: A fast and precise static loop analysis based on abstract interpretation, program slicing and polytope models. In: CGO 2009: Proceedings of the 2009 International Symposium on Code Generation and Optimization, pp. 136–146 (2009)Google Scholar
  28. 28.
    McAllister, T.B.: Coefficient functions of the Ehrhart quasi-polynomials of rational polygons. In: ITSL, pp. 114–118. CSREA Press (2008)Google Scholar
  29. 29.
    Mehlhorn, K., Eigenwillig, A., Kanegossi, K., Kratsch, D., McConnel, R., Meyer, U., Spinrad, J.: Certifying algorithms (a paper under construction) (2005),
  30. 30.
    Meister, B.: Approximations of polytope enumerators using linear expansions. Technical report, Universite Louis Pasteur (May 2007)Google Scholar
  31. 31.
    Necula, G.C.: Proof-carrying code. In: POPL 1997: Proceedings of the 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 106–119 (1997)Google Scholar
  32. 32.
    Pouchet, L.-N., Bastoul, C., Cohen, A., Cavazos, J.: Iterative optimization in the polyhedral model: part II, multidimensional time. SIGPLAN Not. 43(6), 90–100 (2008)CrossRefGoogle Scholar
  33. 33.
    Pugh, W.: Counting solutions to Presburger formulas: how and why. In: PLDI 1994: Proceedings of the ACM SIGPLAN 1994 Conference on Programming Language Design and Implementation, pp. 121–134. ACM, New York (1994)CrossRefGoogle Scholar
  34. 34.
    Reynolds, J.C.: Separation logic: A logic for shared mutable data structures. In: Proceedings of 17th Annual IEEE Symposium on Logic in Computer Science (2002)Google Scholar
  35. 35.
    Sannella, D., Hofmann, M., Aspinall, D., Gilmore, S., Stark, I., Beringer, L., Loidl, H.-W., MacKenzie, K., Momigliano, A., Shkaravska, O.: Mobile resource guarantees. In: Trends in Functional Programming, vol. 6, pp. 211–226. Intellect, Bristol (2007)Google Scholar
  36. 36.
    Tarjan, R.E.: Amortized computational complexity. SIAM Journal on Algebraic and Discrete Methods 6(2), 306–318 (1985)MathSciNetCrossRefzbMATHGoogle Scholar
  37. 37.
    Verdoolaege, S., Bruynooghe, M.: Algorithms for weighted counting over parametric polytopes: A survey and a practical comparison. In: The 2008 International Conference on Information Theory and Statistical Learning, pp. 60–66 (2008)Google Scholar
  38. 38.
    Verdoolaege, S., Seghir, R., Beyls, K., Loechner, V., Bruynooghe, M.: Analytical computation of Ehrhart polynomials: Enabling more compiler analyses and optimizations. In: Proceedings of the 2004 International Conference on Compilers, Architecture, and Synthesis for Embedded Systems (CASES), pp. 248–258 (September 2004)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • David Aspinall
    • 1
  • Robert Atkey
    • 2
  • Kenneth MacKenzie
    • 1
  • Donald Sannella
    • 1
  1. 1.School of InformaticsThe University of EdinburghEdinburgh
  2. 2.Computer and Information SciencesUniversity of StrathclydeGlasgow

Personalised recommendations