A safe and efficient machine-independent code transportation format based on static single assignment form and applied to just-in-time compilation

  • Authors:
  • Jeffery Von Ronne;Michael Franz

  • Affiliations:
  • University of California, Irvine;University of California, Irvine

  • Venue:
  • A safe and efficient machine-independent code transportation format based on static single assignment form and applied to just-in-time compilation
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

The Java Virtual Machine and Microsoft's .NET runtime provide dynamically extensible machine-independent platforms in which untrusted mobile code can be executed in a safe sandboxed environment. This is achieved by using type safe program formats based on stack-oriented virtual machines and verifying them using iterative data-flow analysis. While much research and engineering effort has gone into using just-in-time (JIT) compilation in order to efficiently execute programs in these stack-oriented program representations, comparatively little has gone into considering alternatives to stack-oriented virtual machines that might be more amenable to JIT compilation. Because it eases data-flow analysis, Static Single Assignment Form (SSA) is commonly used in optimizing compilers, and it seemed likely that its use in a code transportation format would also facilitate JIT compilation and type checking. This dissertation explores the potential of compiler-friendly mobile code formats based on SSA, and presents the SafeTSA program representation as a proof of this concept. In addition to using SSA in order to facilitate JIT compilation, SafeTSA adopts a novel approach to safety that replaces verification by using an encoding in which it is impossible to encode programs violating certain system properties, including type safety, and which also reduces program sizes. A substantial implementation effort was undertaken in order to assess the feasibility and evaluate the performance of SSA-based virtual execution environments. This effort included the construction of a front-end compiler (that translates Java source programs to a human readable variant of SafeTSA), a binary SafeTSA encoder (that encodes programs in SafeTSA's inherently safe on-the-wire format), a SafeTSA JIT compiler (that was integrated into the Jikes Research Virtual Machine enabling the execution of SafeTSA programs), and an interpreter for a simple SSA-based representation. The reported experimental results suggest that SSA-based program representations can be stored and transmitted using a space efficient encoding, can speedup JIT compilation reducing total execution time, and can be executed by reasonably efficient interpreters.