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.
Similar content being viewed by others
References
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.
Coglio, A.: Simple verification technique for complex Java bytecode subroutines, in Proc. 4th ECOOP Workshop on Formal Techniques for Java-like Programs, 2002.
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.
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.
Gosling, J., Joy, B., Steele, G. and Bracha, G.: The Java (tm) Language Specification, 2nd edn, Addison-Wesley, 2000.
Gurevich, Y.: Evolving algebras 1993: Lipari guide, in E. Börger (ed.), Specification and Validation Methods, Oxford University Press, 1993, pp. 9-36.
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/.
Henrio, L. and Serpette, B.: A framework for bytecode verifiers: application to intra-procedural continuations, Technical Report, Inria Sophia-Antipolis, 2001.
Klein, G. and Strecker, M.: Verified bytecode verification and type-certifying compilation, Technical Report, Technical University Munich, 2002.
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.
Lindholm, T. and Yellin, F.: The Java (tm) Virtual Machine Specification, 2nd edn, Addison-Wesley, 1999.
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.
Qian, Z.: Standard fixpoint iteration for Java bytecode verification, ACM Transactions on Programming Languages and Systems 22(4) (2000), 638-672.
Schmid, J.: Executing ASM specifications with AsmGofer, Web pages at http://www.tydo.de/AsmGofer, 1999.
Sirer, E., McDirmid, S. and Bershad, B.: Kimera: A Java system security architecture, http://kimera.cs.washington.edu/, 1997.
Stärk, R. F., Schmid, J. and Börger, E.: Java and the Java Virtual Machine - Definition, Verification, Validation, Springer-Verlag, 2001.
Stata, R. and Abadi, M.: A type system for Java bytecode subroutines, ACM Transactions on Programming Languages and Systems 21(1) (1999), 90-137.
Strecker, M.: Investigating type-certifying compilation with Isabelle, in Proc. Conference on Logic for Programming, Artificial Intelligence, and Reasoning (LPAR), 2002.
Sun Microsystems: Connected, limited device configuration, Specification 1.0, Java 2 Platform Micro Edition, 2000.
Author information
Authors and Affiliations
Rights 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
Issue Date:
DOI: https://doi.org/10.1023/A:1025003423108