Binding-time analysis for a JVM core language describes a constraint-based static analysis for a subset of the Java bytecode instruction set. The analysis calculates a binding-time type for each instruction of a program and inserts special 'lift' instructions as required for coercing values in the program to a more dynamic context. The resulting annotated program may be specialized automatically by an off-line partial evaluator for the core language. The binding-time analysis has been implemented in Standard ML and examples are given in the report to illustrate how the analysis works. A specializer has not been implemented, but an approach to specialization is described thoroughly in the report.
My Master's thesis, Compiling SML to Java Bytecode, describes the design and implementation of a compiler from Standard ML (SML) to Java bytecode. The compiler is based on the batch compiler of Moscow ML and supports the core language of SML plus `flat' structures (as in Moscow ML version 1.x). There is no support for any Basis Library modules and no interactive level is provided. The thesis also describes the SML-JVM Toolkit which was developed as part of the compiler project. The toolkit comprises a set of SML modules that provide support for generation and manipulation of Java bytecode and class files.
Dynamic semantics of Java bytecode (13 pages) outlines a formalization of the Java Virtual Machine (JVM) and illustrates the approach for a few selected JVM instructions. This paper was presented at the Workshop on Principles of Abstract Machines in Pisa, September 1998.
Semantics of Java Byte Code gives a formal specification of the JVM and the dynamic semantics of its instruction set. The JVM is modelled as an infinite state machine and each bytecode instruction is modelled by a transition rule, describing how the state is changed and the conditions under which execution succeeds. The report also lists a number of errors and ambiguities in Sun's original specification of the JVM. Topics not covered by the report include multithreading, detailed class file verification, and the multitude of exceptions that may be raised by failing bytecode instructions.
The SML-JVM Toolkit: a set of Standard ML modules for representing Java bytecode and generating Java class files.
The Java Spec Report (some time ago together with Roly Perera): a web-site listing problems in the core Java specifications.
Review of the Java Virtual Machine Specification from Sun Microsystems, Inc., prior to their release of the second edition, April 1999.