Generic Adaptive Syntax-Directed Compression for Mobile Code
Christian H. Stork, Vivek Haldar, Michael M. Franz · 2001
We propose a new scheme for compressing mobile programs. Our proposal is meant as part of a larger infrastructure for code distribution and deployment. In this paper we show how to e#ectively compress programs on the source level by compressing abstract syntax trees (ASTs) which are equivalent to source code (modulo comments and layout). We compress ASTs by adapting the wellknown PPM (prediction by partial match) compression scheme to work with trees. Our compression algorithm and the resulting file format are generic in the sense that they are parameterized for each source language by an abstract grammar and some additional information for e#cient compression. Compressing Java programs with our algorithm achieves an unmatched compression ratio without necessitating language-specific modifications to our framework. Preliminary benchmarks reveal a higher compression ratio than the best published compression scheme for Java class files. Contents 1 Introduction 2 1.1 Vision . . . . . . ...