Next: The Implementation
Up: Conclusion
Previous: Conclusion
This paper illustrated a step by step method for constructing correct and efficient
implementations of DSLs. The method has the following advantages over building a DSL
implementation in an ad-hoc fashion.
- Simplicity. We divide the task of DSL implementation of DSL into small
manageable tasks. The compiler is constructed by a method of refinement, and we use
special abstraction mechanisms so that each step addresses only a single aspect of the
compiler.
- Reuse. Our method provides many opportunities for reuse. By using the
abstraction methods of monads and staging, much of the code remains unchanged between
refinement steps. In addition, monad implementations are reusable across DSLs, and
multiple DLS using the same target language can reuse the intensional analysis.
- Control. Instead of using a fixed set of techniques or tool to generate
compilers, we outline a method which provides users control over each step. A good
impedance match between low-level features of the target language and the
high-level DSL is necessary for good performance. Since every compiler is different,
users need such fine grained control.
- Correctness. The METAML type system provides major support for ensuring the
correctness of the compilers generated. It is simply not possible to write a type-incorrect
translation. But type-correctness is not enough. We wish to prove other correctness properties
as well, such as the equivalence between the artifacts produced by each step of the method. We
believe that it is possible for each step to make explicit its proof obligations, and because
each step produces a functional program, it is possible to use equational reasoning to prove
these obligations
Zine-El-abidine Benaissa
Wed Jul 21 11:46:59 PDT 1999