Research on Domain-specific Embedded Languages and Program Generators
Samuel N. Kamin · Electronic Notes in Theoretical Computer Science · 1998
Embedding is the process of implementing a language by defining functions in an existing “host” Language; the host language with these added functions is the new language. As a consequence; the new language comes equipped with all the features of the host language, with no additional work on the part of the language designer. Embedding works particularly well when the host language is a functional language. We describe several examples of embedded languages. The first is a language for specifying simple pictures. The others are program generators, that is, languages used to specify programs in other languages. In all of these examples, the host language is Standard ML; in the program generating languages, the target language is C+plus;. The power obtained from the host language is the main emphasis of our presentation. The author gratefully acknowledges the support provided by the Oregon Graduate Institute, where he was on sabbatical during the preparation of this paper.