Tm: a code generator for recursive data structures
Software—Practice & Experience
Design patterns: elements of reusable object-oriented software
Design patterns: elements of reusable object-oriented software
V-cal: A Calculus for the Compilation of Data Parallel Languages
LCPC '95 Proceedings of the 8th International Workshop on Languages and Compilers for Parallel Computing
A nanopass infrastructure for compiler education
Proceedings of the ninth ACM SIGPLAN international conference on Functional programming
EDUCATIONAL PEARL: A Nanopass framework for compiler education
Journal of Functional Programming
Hi-index | 0.00 |
We have developed Tm, a template-based metacompiler. Given a set of data-structure definitions and a template, Tm generates files that instantiate the template for the given data structures. With this process, Tm is able to generate program code to manipulate these data structures. Since it uses templates, the generated code is not restricted to a specific programming language: any sufficiently powerful programming language can be targeted. Tm has been used for a wide variety of tasks and languages. However, it was designed to support compiler construction, and most applications have been in that area. In this paper we outline Tm, and describe our experiences with using it to construct a static compiler for Java. As we will show, it has significantly accelerated implementation of the compiler. Almost 75% of its source code is generated by Tm, allowing us to rapidly implement a much more robust and sophisticated compiler than would have been possible otherwise.