Bytecode compression via profiled grammar rewriting

Citation
Ws. Evans et Cw. Fraser, Bytecode compression via profiled grammar rewriting, ACM SIGPL N, 36(5), 2001, pp. 148-155
Citations number
25
Categorie Soggetti
Computer Science & Engineering
Journal title
ACM SIGPLAN NOTICES
ISSN journal
15232867 → ACNP
Volume
36
Issue
5
Year of publication
2001
Pages
148 - 155
Database
ISI
SICI code
1523-2867(200105)36:5<148:BCVPGR>2.0.ZU;2-B
Abstract
This paper describes the design and implementation of a method for producin g compact, bytecoded instruction sets and interpreters for them. It accepts a grammar for programs written using a simple bytecoded stack-based instru ction set, as well as a training set of sample programs. The system transfo rms the grammar, creating an expanded grammar that represents the same lang uage as the original grammar, but permits a shorter derivation of the sampl e programs and others like them. A program's derivation under the expanded grammar forms the compressed bytecode representation of the program. The in terpreter for this bytecode is automatically generated from the original by tecode interpreter and the expanded grammar. Programs expressed using compr essed bytecode can be substantially smaller than their original bytecode re presentation and even their machine code representation. For example, compr ession cuts the bytecode for Ice from 199KB to 58KB but increases the size of the interpreter by just over 11KB.