Mixing Source and Bytecode
A Case for Compilation by Normalization
Lennart C. L. Kats, Martin Bravenboer, Eelco Visser. Mixing Source and Bytecode. A Case for Compilation by Normalization. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2008), ACM SIGPLAN Notices 43(10), pages 91—108. ACM, October 2008. [pdf] [doi] [bib]
Abstract
Language extensions increase programmer productivity by providing concise, often domain-specific syntax, and support for static verification of correctness, security, and style constraints. Language extensions can often be realized through translation to the base language, supported by preprocessors and extensible compilers. However, various kinds of extensions require further adaptation of a base compiler's internal stages and components, for example to support separate compilation or to make use of low-level primitives of the platform (e.g., jump instructions or unbalanced synchronization). To allow for a more loosely coupled approach, we propose an open compiler model based on normalization steps from a high-level language to a subset of it, the core language. We developed such a compiler for a mixed Java and (core) bytecode language, and evaluate its effectiveness for composition mechanisms such as traits, as well as statement-level and expression-level language extensions.
Presentation
Slides (PDF): Mixing Source and Bytecode.
More information
More information about this project can be found at the Dryad Compiler project homepage.