Executable JVM model for analytical reasoning: a study

  • Authors:
  • Hanbing Liu;J. Strother Moore

  • Affiliations:
  • Department of Computer Sciences, University of Texas at Austin, University Station, Austin, TX;Department of Computer Sciences, University of Texas at Austin, University Station, Austin, TX

  • Venue:
  • Science of Computer Programming - Special issue on advances in interpreters, virtual machines and emulators (IVME'03)
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

To study the properties of the Java Virtual Machine (JVM) and Java programs, our research group has produced a series of JVM models written in a functional subset of Common Lisp. In this paper, we present our most complete JVM model from this series, namely, M6, which is derived from a careful study of the J2ME KVM [Connected Limited Device Configuration (CLDC) and the K Virtual Machine, http://java.sun.con/products/cldc/] implementation.On the one hand, our JVM model is a conventional machine emulator. M6 implements dynamic class loading, class initialization and synchronization via monitors. It executes most J2ME CLDC Java programs that do not use any I/O or floating point operations. Engineers may consider M6 an implementation of the JVM. The June 2003 version is implemented with around 10K lines of Lisp in 28 modules.On the other hand, M6 is novel because it allows for analytical reasoning in addition to conventional testing. M6 is written in an applicative (side-effect free) subset of Common Lisp, for which we have given precise meaning in terms of axioms and inference rules. Properties of M6 and its bytecoded programs can be expressed as formulas and proved as theorems. Proofs are constructed interactively with a mechanical theorem prover. Its concreteness, completeness, executability and mechanized reasoning support make our model unique among JVM models.We argue that our approach of building an executable model of the system with an axiomatically described functional language can bring benefits from both the testing and the formal reasoning worlds.