Pragmatic Aspects of Reusable Program Generators
When writing a program generator requires considerable intellectual
effort, it is valuable to amortize that effort by
using the generator to
build more than one application.
When a program generator serves multiple clients, however, the
implementor must address
pragmatic questions that implementors of single-use program generators
can ignore.
In how many languages should generated code be written?
How should code be packaged?
What should the interfaces to the client code look like?
How should a user control variations?
This paper elaborates on these questions by means of case studies
of the New Jersey Machine-Code Toolkit, the
\-RTL Translator, and the ASDL program generator.
It is hoped that the paper will stimulate the
development of better techniques.
Most urgently needed are
a standard way to support multiple target languages
and
a simple, clear way to control interfaces
to generated code.
Full paper
The paper is available as
US Letter PostScript (520K),
US Letter PDF (376K),
US Letter TeX DVI (162K),
and
DjVu scanned reprint (3.7M).