Hostname: page-component-cd9895bd7-gxg78 Total loading time: 0 Render date: 2024-12-26T05:44:54.418Z Has data issue: false hasContentIssue false

Compiling embedded languages

Published online by Cambridge University Press:  13 May 2003

CONAL ELLIOTT
Affiliation:
Microsoft Research, One Microsoft Way, Redmond, WA 98052, USA
SIGBJØRN FINNE
Affiliation:
Galois Connections, Inc., 3875 SW Hall Blvd., Beaverton, OR 97005, USA
OEGE DE MOOR
Affiliation:
Oxford University Computing Laboratory, Wolfson Building, Parks Road, Oxford OX1 3QD, UK
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

Functional languages are particularly well-suited to the interpretive implementations of Domain-Specific Embedded Languages (DSELs). We describe an implemented technique for producing optimizing compilers for DSELs, based on Kamin's idea of DSELs for program generation. The technique uses a data type of syntax for basic types, a set of smart constructors that perform rewriting over those types, some code motion transformations, and a back-end code generator. Domain-specific optimization results from chains of domain-independent rewrites on basic types. New DSELs are defined directly in terms of the basic syntactic types, plus host language functions and tuples. This definition style makes compilers easy to write and, in fact, almost identical to the simplest embedded interpreters. We illustrate this technique with a language Pan for the computationally intensive domain of image synthesis and manipulation.

Type
Research Article
Copyright
© 2003 Cambridge University Press
Submit a response

Discussions

No Discussions have been published for this article.