Advertisement

A Provably Correct Stackless Intermediate Representation for Java Bytecode

  • Delphine Demange
  • Thomas Jensen
  • David Pichardie
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6461)

Abstract

The Java virtual machine executes stack-based bytecode. The intensive use of an operand stack has been identified as a major obstacle for static analysis and it is now common for static analysis tools to manipulate a stackless intermediate representation (IR) of bytecode programs. This paper provides such a bytecode transformation, describes its semantic correctness and evaluates its performance. We provide the semantic foundations for proving that an initial program and its IR behave similarly, in particular with respect to object creation and throwing of exceptions. The correctness of this transformation is proved with respect to a relation on execution traces taking into account that the object allocation order is not preserved by the transformation.

Keywords

Semantic Relation Execution Trace Symbolic Execution Java Virtual Machine Program Point 
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.
    Barthe, G., Kunz, C., Pichardie, D., Samborski-Forlese, J.: Preservation of proof obligations for hybrid verification methods. In: Proc. of SEFM 2008, pp. 127–136. IEEE Computer Society, Los Alamitos (2008)Google Scholar
  2. 2.
    Besson, F., Jensen, T., Pichardie, D.: Proof-carrying code from certified abstract interpretation and fixpoint compression. Theor. Comput. Sci. 364(3), 273–291 (2006)MathSciNetCrossRefzbMATHGoogle Scholar
  3. 3.
    Burke, M.G., Choi, J., Fink, S., Grove, D., Hind, M., Sarkar, V., Serrano, M.J., Sreedhar, V.C., Srinivasan, H., Whaley, J.: The Jalapeño dynamic optimizing compiler for Java. In: Proc. of JAVA 1999, pp. 129–141. ACM, New York (1999)Google Scholar
  4. 4.
    Cramer, T., Friedman, R., Miller, T., Seberger, D., Wilson, R., Wolczko, M.: Compiling Java just in time. IEEE Micro 17(3), 36–43 (1997)CrossRefGoogle Scholar
  5. 5.
    Demange, D., Jensen, T., Pichardie, D.: A provably correct stackless intermediate representation for Java bytecode. Research Report 7021, INRIA (2009), http://www.irisa.fr/celtique/ext/bir/rr7021.pdf
  6. 6.
    Freund, S.N., Mitchell, J.C.: The type system for object initialization in the Java bytecode language. ACM TOPLAS 21(6), 1196–1250 (1999)CrossRefGoogle Scholar
  7. 7.
    Klein, G., Nipkow, T.: A machine-checked model for a Java-like language, virtual machine and compiler. ACM TOPLAS 28(4), 619–695 (2006)CrossRefGoogle Scholar
  8. 8.
    Logozzo, F., Fähndrich, M.: On the relative completeness of bytecode analysis versus source code analysis. In: Hendren, L. (ed.) CC 2008. LNCS, vol. 4959, pp. 197–212. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  9. 9.
    Matsuno, Y., Ohori, A.: A type system equivalent to static single assignment. In: PPDP 2006: Proceedings of the 8th ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming, pp. 249–260. ACM, New York (2006)Google Scholar
  10. 10.
    The Jikes RVM Project. Jikes rvm - home page, http://jikesrvm.org
  11. 11.
    Rose, E.: Lightweight bytecode verification. J. Autom. Reason. 31(3-4), 303–334 (2003)CrossRefzbMATHGoogle Scholar
  12. 12.
    Stark, R.F., Borger, E., Schmid, J.: Java and the Java Virtual Machine: Definition, Verification, Validation with Cdrom. Springer, New York (2001)CrossRefzbMATHGoogle Scholar
  13. 13.
    Strecker, M.: Formal verification of a Java compiler in Isabelle. In: Voronkov, A. (ed.) CADE 2002. LNCS (LNAI), vol. 2392, pp. 63–77. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  14. 14.
    Vallée-Rai, R., Co, P., Gagnon, E., Hendren, L., Lam, P., Sundaresan, V.: Soot - a Java bytecode optimization framework. In: Proc. of CASCON 1999. IBM Press (1999)Google Scholar
  15. 15.
    Vallee-Rai, R., Hendren, L.J.: Jimple: Simplifying Java bytecode for analyses and transformations (1998)Google Scholar
  16. 16.
    Whaley, J.: Dynamic optimization through the use of automatic runtime specialization. Master’s thesis, Massachusetts Institute of Technology (May 1999)Google Scholar
  17. 17.
    Wildmoser, M., Chaieb, A., Nipkow, T.: Bytecode analysis for proof carrying code. In: Proc. of BYTECODE 2005, Electronic Notes in Computer Science (2005)Google Scholar
  18. 18.
    Xi, H., Xia, S.: Towards array bound check elimination in Java tm virtual machine language. In: Proc. of CASCON 1999, p. 14. IBM Press (1999)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Delphine Demange
    • 1
  • Thomas Jensen
    • 2
  • David Pichardie
    • 2
  1. 1.ENS Cachan Antenne de Bretagne / IRISAFrance
  2. 2.INRIA, Centre Rennes - Bretagne AtlantiqueRennesFrance

Personalised recommendations