Resource Bound Certification for a Tail-Recursive Virtual Machine

  • Silvano Dal Zilio
  • Régis Gascon
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3780)


We define a method to statically bound the size of values computed during the execution of a program as a function of the size of its parameters. More precisely, we consider bytecode programs that should be executed on a simple stack machine with support for algebraic data types, pattern-matching and tail-recursion. Our size verification method is expressed as a static analysis, performed at the level of the bytecode, that relies on machine-checkable certificates. We follow here the usual assumption that code and certificates may be forged and should be checked before execution.

Our approach extends a system of static analyses based on the notion of quasi-interpretations that has already been used to enforce resource bounds on first-order functional programs. This paper makes two additional contributions. First, we are able to check optimized programs, containing instructions for unconditional jumps and tail-recursive calls, and remove restrictions on the structure of the bytecode that was imposed in previous works. Second, we propose a direct algorithm that depends only on solving a set of arithmetical constraints.


Virtual Machine Proof Obligation Polynomial Expression Java Virtual Machine Branch Instruction 
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.
    Amadio, R., Coupet-Grimal, S., Dal Zilio, S., Jakubiec, L.: A functional scenario for bytecode verification of resource bounds. In: Marcinkowski, J., Tarlecki, A. (eds.) CSL 2004. LNCS, vol. 3210, pp. 265–279. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  2. 2.
    Amadio, R., Dal Zilio, S.: Resource control for synchronous cooperative threads. In: Gardner, P., Yoshida, N. (eds.) CONCUR 2004. LNCS, vol. 3170, pp. 68–82. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  3. 3.
    Amadio, R.: Max-plus quasi-interpretations. In: Hofmann, M.O. (ed.) TLCA 2003. LNCS, vol. 2701, pp. 31–45. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  4. 4.
    Amadio, R.: Synthesis of max-plus quasi-interpretations. Fundamenta Informaticae 65(1-2), 29–60 (2005)zbMATHMathSciNetGoogle Scholar
  5. 5.
    Bellantoni, S., Cook, S.: A new recursion-theoretic characterization of the poly-time functions. Computational Complexity 2, 97–110 (1992)zbMATHCrossRefMathSciNetGoogle Scholar
  6. 6.
    Cobham, A.: The intrinsic computational difficulty of functions. In: Proceedings Logic, Methodology, and Philosophy of Science II. North-Holland, Amsterdam (1965)Google Scholar
  7. 7.
    Crary, K., Weirich, S.: Resource bound certification. In: Principles of Programming Languages (POPL). ACM Press, New York (2000)Google Scholar
  8. 8.
    Dal Zilio, S., Gascon, R.: Resource Bound Certification for a Tail-Recusive Virtual Machine. LIF Research Report 26 (2005)Google Scholar
  9. 9.
    Hofmann, M.: The strength of non size-increasing computation. In: Principles of Programming Languages (POPL). ACM, New York (2002)Google Scholar
  10. 10.
    Jones, N.: Computability and complexity, from a programming perspective. MIT Press, Cambridge (1997)zbMATHGoogle Scholar
  11. 11.
    Lindholm, T., Yellin, F.: The Java virtual machine specification. Addison-Wesley, Reading (1999)Google Scholar
  12. 12.
    Marion, J.-Y.: Complexité implicite des calculs, de la théorie à la pratique. Habilitation à diriger des recherches, Université de Nancy (2000)Google Scholar
  13. 13.
    Marion, J.-Y., Moyen, J.-Y.: Termination and resource analysis of assembly programs by Petri Nets. Technical Report, Université de Nancy (2003)Google Scholar
  14. 14.
    Morriset, G., Walker, D., Crary, K., Glew, N.: From system F to typed assembly language. ACM Transactions on Programming Languages and Systems 21(3), 528–569 (1999)CrossRefGoogle Scholar
  15. 15.
    Sannella, D.: Mobile Resource Guarantee. IST-Global Computing research project (2001),
  16. 16.
    Kildall, G.: A unified approach to global program optimization. In: Principles of Programming Languages (POPL). ACM, New York (1973)Google Scholar
  17. 17.
    Necula, G.: Proof-carrying code. In: Principles of Programming Languages (POPL). ACM, New York (1997)Google Scholar
  18. 18.
    Tofte, M., Talpin, J.-P.: Region-Based Memory Management. Information and Computation 132(2), 109–176 (1997)zbMATHCrossRefMathSciNetGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Silvano Dal Zilio
    • 1
  • Régis Gascon
    • 2
  1. 1.LIF, CNRS and Université de ProvenceFrance
  2. 2.LSV, CNRS and ENS CachanFrance

Personalised recommendations