next up previous
Next: Overview Up: Joeq: A Virtual Machine Previous: Joeq: A Virtual Machine


Introduction

Joeq is a virtual machine and compiler infrastructure designed to be a platform for research in compilation and virtual machine technologies. We had three main goals in designing the system. First and foremost, we wanted the system to be flexible. We are interested in a variety of compiler and virtual machine research topics, and we wanted a system that would not be specific to researching a particular area. For example, we have interest in both static and dynamic compilation techniques, and in both type-safe and unsafe languages. We wanted a system that would be as open and general as possible, without sacrificing usability or performance.

Second, we wanted the system to be easy to experiment with. As its primary focus is research, it should be straightforward to prototype new ideas in the framework. With this in mind, we tried to make the system as modular as possible, so that each component is easily replaceable. Learning from our experience with Jalapeno, another virtual machine written in Java, we decided to implement the entire system in Java. This makes it easy to quickly implement and prototype new ideas, and features like garbage collection and exception tracebacks ease debugging and improve productivity. Java, being a dynamic language, is also a good consumer for many of our dynamic compilation techniques; the fact that our dynamic compiler can compile the code of the virtual machine itself means that it can dynamically optimize the virtual machine code with respect to the application that is running on it. Java's object-oriented nature also facilitates modularity of the design and implementation.

Third, we wanted the system to be useful to a wide audience. The fact that the system is written in Java means that much of the system can be used on any platform that has an implementation of a Java virtual machine. The fact that Joeq supports popular input languages like Java, C, C++, Fortran, and even x86 binary code increases the scope of input programs. We released the system on the SourceForge web site as open source under the Library GNU Public License. It has been picked up by researchers on five continents for various purposes, among them: automatic extraction of component interfaces[28], static whole-program pointer analysis[27], context-sensitive call graph construction, automatic distributed computation, versioned type systems for operating systems, sophisticated profiling of applications[24], advanced dynamic compilation techniques[25], system checkpointing[26], anomaly detection[16], secure execution platforms and autonomous systems[7]. In addition, Joeq is now used as the basis of the Advanced Compilation Techniques class taught at Stanford University.

Joeq supports two modes of operation: native execution and hosted execution. In native execution, the Joeq code runs directly on the hardware. It uses its own run-time routines, thread package, garbage collector, etc. In hosted execution, the Joeq code runs on top of another virtual machine. Operations to access objects are translated into calls into the reflection library of the host virtual machine. The user code that executes is identical, and only a small amount of functionality involving unsafe operations is not available when running in hosted execution mode. Hosted execution is useful for debugging purposes and when the underlying machine architecture is not yet directly supported by Joeq. We also use hosted execution mode to bootstrap the system and perform checkpointing[26], a technique for optimizing application startup times.

The remainder of this paper is organized as follows. Section 2 gives an overview of the Joeq system. Sections 3 through 9 cover each of the components in detail. Section 10 covers some related work, and section 11 discusses the state of the project and some future directions.


next up previous
Next: Overview Up: Joeq: A Virtual Machine Previous: Joeq: A Virtual Machine
John Whaley 2003-03-15