Skip to main content
Log in

Completeness of a Bytecode Verifier and a Certifying Java-to-JVM Compiler

  • Published:
Journal of Automated Reasoning Aims and scope Submit manuscript

Abstract

During an attempt to prove that the Java-to-JVM compiler generates code that is accepted by the bytecode verifier, we found examples of legal Java programs that are rejected by the verifier. We propose therefore to restrict the rules of definite assignment for the try-finally statement as well as for the labeled statement so that the example programs are no longer allowed. Then we can prove, using the framework of Abstract State Machines, that each program from the slightly restricted Java language is accepted by the Bytecode Verifier. In the proof we use a new notion of bytecode type assignment without subroutine call stacks.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Similar content being viewed by others

References

  1. Börger, E.: The origins and the development of the ASM method for high level system design and analysis, J. Universal Computer Science 8(1) (2002), 2-74.

    Google Scholar 

  2. Coglio, A.: Simple verification technique for complex Java bytecode subroutines, in Proc. 4th ECOOP Workshop on Formal Techniques for Java-like Programs, 2002.

  3. Colby, C., Lee, P., Necula, G. C., Blau, F., Plesko, M. and Cline, K.: A certifying compiler for Java, in SIGPLAN Conference on Programming Language Design and Implementation, 2000, pp. 95-107.

  4. Freund, S. N. and Mitchell, J. C.: The type system for object initialization in the Java bytecode language, ACM Transactions on Programming Languages and Systems 21(6) (1999), 1196-1250.

    Article  Google Scholar 

  5. Gosling, J., Joy, B., Steele, G. and Bracha, G.: The Java (tm) Language Specification, 2nd edn, Addison-Wesley, 2000.

  6. Gurevich, Y.: Evolving algebras 1993: Lipari guide, in E. Börger (ed.), Specification and Validation Methods, Oxford University Press, 1993, pp. 9-36.

  7. Haase, E.: JustIce: An implementation of a free class file verifier for Java, Technical Report, Institut für Informatik, Freie Universität Berlin, 2001, http://bcel.sourceforge.net/ justice/.

  8. Henrio, L. and Serpette, B.: A framework for bytecode verifiers: application to intra-procedural continuations, Technical Report, Inria Sophia-Antipolis, 2001.

  9. Klein, G. and Strecker, M.: Verified bytecode verification and type-certifying compilation, Technical Report, Technical University Munich, 2002.

  10. Leroy, X.: On-card bytecode verification for Java Card, in I. Attali and T. Jensen (eds.), Smart Card Programming and Security (E-smart 2001), 2001, pp. 150-164.

  11. Lindholm, T. and Yellin, F.: The Java (tm) Virtual Machine Specification, 2nd edn, Addison-Wesley, 1999.

  12. O'Callahan, R.: A simple, comprehensive type system for Java bytecode subroutines, in Proc. 26th ACM Symposium on Principles of Programming Languages, 1998, pp. 70-78.

  13. Qian, Z.: Standard fixpoint iteration for Java bytecode verification, ACM Transactions on Programming Languages and Systems 22(4) (2000), 638-672.

    Article  Google Scholar 

  14. Schmid, J.: Executing ASM specifications with AsmGofer, Web pages at http://www.tydo.de/AsmGofer, 1999.

  15. Sirer, E., McDirmid, S. and Bershad, B.: Kimera: A Java system security architecture, http://kimera.cs.washington.edu/, 1997.

  16. Stärk, R. F., Schmid, J. and Börger, E.: Java and the Java Virtual Machine - Definition, Verification, Validation, Springer-Verlag, 2001.

  17. Stata, R. and Abadi, M.: A type system for Java bytecode subroutines, ACM Transactions on Programming Languages and Systems 21(1) (1999), 90-137.

    Article  Google Scholar 

  18. Strecker, M.: Investigating type-certifying compilation with Isabelle, in Proc. Conference on Logic for Programming, Artificial Intelligence, and Reasoning (LPAR), 2002.

  19. Sun Microsystems: Connected, limited device configuration, Specification 1.0, Java 2 Platform Micro Edition, 2000.

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Stärk, R.F., Schmid, J. Completeness of a Bytecode Verifier and a Certifying Java-to-JVM Compiler. Journal of Automated Reasoning 30, 323–361 (2003). https://doi.org/10.1023/A:1025003423108

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1023/A:1025003423108

Navigation