A formal specification of java(tin) virtual machine instructions

In this paper we formally specify a large subset of Java Virtual Machine instructions based on the descriptions in the Java Virtual Machine Speciication by Lindholm and Yellin, in the Java Speciication by Gosling, Joy and Steele, and based on the behaviors of some test programs on Sun's implementation of the Java Virtual Machine. The formal speciication describes the runtime behaviors of the instructions in related memory areas as (runtime) state transitions and most structural constraints on instructions as a compile-time (or link-time) type inference system. The latter part corresponds to a core of the Bytecode Veriier and resembles dataaow analysis and abstract interpretation. We prove properties based on the formal speciication. In particular, we prove that if the type inference system can derive certain compile-time (or link-time) types for a program, then the runtime data of the program will be type-correct with respect to these types in a certain sense. Indeed, our formal speciication clariies some ambiguities and incompleteness and removes some (in our view) unnecessary restrictions in the description of the (informal) Java Virtual Machine Speciication.

[1]  Drew Dean,et al.  The security of static typing with dynamic linking , 1997, CCS '97.

[2]  Sophia Drossopoulou,et al.  Java is Type Safe - Probably , 1997, ECOOP.

[3]  Dieter Maurer,et al.  Compiler Design , 2013, Springer Berlin Heidelberg.

[4]  David von Oheimb Javàight Is Type-safe | Deenitely , 1998 .

[5]  Don Syme,et al.  Proving Java Type Soundness , 1999, Formal Syntax and Semantics of Java.

[6]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.