Skip to main content

A Provably Correct Stackless Intermediate Representation for Java Bytecode

  • Conference paper
Programming Languages and Systems (APLAS 2010)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 6461))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  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. Besson, F., Jensen, T., Pichardie, D.: Proof-carrying code from certified abstract interpretation and fixpoint compression. Theor. Comput. Sci. 364(3), 273–291 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  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. Cramer, T., Friedman, R., Miller, T., Seberger, D., Wilson, R., Wolczko, M.: Compiling Java just in time. IEEE Micro 17(3), 36–43 (1997)

    Article  Google Scholar 

  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. Freund, S.N., Mitchell, J.C.: The type system for object initialization in the Java bytecode language. ACM TOPLAS 21(6), 1196–1250 (1999)

    Article  Google Scholar 

  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)

    Article  Google Scholar 

  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)

    Chapter  Google Scholar 

  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. The Jikes RVM Project. Jikes rvm - home page, http://jikesrvm.org

  11. Rose, E.: Lightweight bytecode verification. J. Autom. Reason. 31(3-4), 303–334 (2003)

    Article  MATH  Google Scholar 

  12. Stark, R.F., Borger, E., Schmid, J.: Java and the Java Virtual Machine: Definition, Verification, Validation with Cdrom. Springer, New York (2001)

    Book  MATH  Google Scholar 

  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)

    Chapter  Google Scholar 

  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. Vallee-Rai, R., Hendren, L.J.: Jimple: Simplifying Java bytecode for analyses and transformations (1998)

    Google Scholar 

  16. Whaley, J.: Dynamic optimization through the use of automatic runtime specialization. Master’s thesis, Massachusetts Institute of Technology (May 1999)

    Google Scholar 

  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. 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 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Demange, D., Jensen, T., Pichardie, D. (2010). A Provably Correct Stackless Intermediate Representation for Java Bytecode. In: Ueda, K. (eds) Programming Languages and Systems. APLAS 2010. Lecture Notes in Computer Science, vol 6461. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-17164-2_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-17164-2_8

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-17163-5

  • Online ISBN: 978-3-642-17164-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics