Well: a language-agnostic foundation for compact and inherently safe mobile code

  • Authors:
  • Michael Franz;Christian H. Stork

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

  • Venue:
  • Well: a language-agnostic foundation for compact and inherently safe mobile code
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

This dissertation is inspired by the desire to enable the safe, flexible, and efficient transport of programs. The traditional solution to this problem is to compile the program into some lower-level representation, such as bytecode or machine code. This is unsatisfactory mainly because it ties the code format to a specific machine model and because it is impossible for the code receiver to verify safety properties and annotations at the appropriate level of abstraction. In this dissertation we present the WELL framework for mobile code specification and compression. WELL generalizes abstract syntax trees to static semantic trees (SSTs). SSTs are built according to a static semantic specifications (SSSs), which are a novel kind of higher-order data type with binding specifications. We establish a direct correspondence between SSTs and proofs and use it, for example, to present an adequate specification of System F. In an effort to make the specification of common programming language constructs such as Scheme's letrec practically feasible we introduce a new finitary binding concept. In WELL each SSS corresponds to a pair of encoding and decoding functions. On a logical level, the encoding function maps SSTs to their Gödel number and the decoding function maps such numbers, i.e., bit strings or files, back to SSTs. The decoded SST exhibits by construction all the properties mandated by its SSS, in particular, its corresponding proof. Interestingly, the inherent safety feature does not necessarily increase program representation size. On the contrary, we are able to exploit the constraints specified in the SSS to significantly enhance the compression of SSTs. To this end, we adapted a statistical compression technique, namely prediction by partial match (PPM), to operate naturally on SSTs and to benefit from the knowledge of the SSS. Using compressed SSTs we are able to improve the compression of Java programs by 15--60% over the best know Java-specific compression technique. Furthermore, we present a new variation of escape analysis, whose results can be encoded as safe code annotations. Finally, we propose WELL as the foundation for a new code distribution infrastructure.