A Formal Specification of Javaℳ Virtual Machine Instructions for Objects, Methods and Subroutines
In this chapter we formally specify a subset of Java Virtual Machine (JVM) instructions for objects, methods and subroutines based on the official JVM Specification, the official Java Language Specification and Sun’s JDK 1.1.4 implementation of the JVM. Our formal specification describes the runtime behaviors of the instructions in relevant memory areas as state transitions and most structural and linking constraints on the instructions as a static typing system. The typing system includes a core of the Bytecode Verifier and resembles data-flow analysis. We state some properties based on our formal specification and sketch the proofs. One of these properties is that if a JVM program is statically well-typed with respect to the typing system, then the runtime data of the program will be type-correct. Our formal specification clarifies some ambiguities and incompleteness and removes some (in our view) unnecessary restrictions in the description of the official JVM Specification.
KeywordsVirtual Machine Memory Location Execution Path Program Type Typing Rule
Unable to display preview. Download preview PDF.
- 1.A. Aho, R. Sethi, and J. Ullman. Compilers — Principles, Techniques, and Tools. Addison-Wesley Publishing Company, 1986.Google Scholar
- 2.R. Cohen. The Defensive Java Virtual Machine specification. Technical report, Computational Logic inc., 1997.Google Scholar
- 3.D. Dean. The security of static typing with dynamic linking. In Proc. 4th ACM Conf. on Computer and Communications Security. ACM, 1996.Google Scholar
- 4.S. Dossopoulou and S. Eisenbach. Java is type safe — probably. In Proc. 11th European Conf. on Object-Oriented Programming, pages 389–418. Springer-Verlag LNCS 1241, 1997.Google Scholar
- 5.S. Freund and J. Mitchell. A type system for object initialization in the java bytecode language. Presented at Int. Workshop on Security and Languages, Oct. 1997.Google Scholar
- 6.S. Freund and J. Mitchell. A type system for object initialization in the java bytecode language (summary). Electronic Notes in Theoretical Computer Science, 10, 1998. http://www.elsevier.nl/locate/entcs/volume10.html.
- 7.A. Goldberg. A specification of Java loading and bytecode verification. 1997.Google Scholar
- 8.J. Gosling, B. Joy, and G. Steele. The Javaℳ Language Specification. Addison-Wesley, 1996.Google Scholar
- 9.M. Hagiya. On a new method fot dataflow analysis of Java Virtual Machine subroutines. 1998.Google Scholar
- 10.T. Lindholm and F. Yellin. The Javaℳ Virtual Machine Specification. Addison-Wesley, 1996.Google Scholar
- 11.T. Nipkow and D. von Oheimb. Javalight is type-safe — definitely. In Proc. 25st ACM Symp. Principles of Programming Languages, 1998.Google Scholar
- 12.Z. Qian. A formal specification of Javaℳ Virtual Machine instructions. Technical report, FB Informatik, UniversitÄt Bremen, September 1997. Revised version to appear June 1998.Google Scholar
- 13.V. Saraswat. Java is not type-safe. Technical report, AT&T Research, 1997.Google Scholar
- 14.E. Sirer, S. McDirmid, and B. Bershad. A Java system security architecture. http://kimera.cs.washington.edu/, 1997.
- 15.R. Stata and M. Abadi. A type system for Java bytecode subroutines. In Proc. 25st ACM Symp. Principles of Programming Languages, 1998.Google Scholar
- 16.D. Syme. Proving Java type soundness. Technical report, University of Cambridge Computer Laboratory, 1997.Google Scholar