Results 1 -
3 of
3
Semantics-Based Compiling: A Case Study in Type-Directed Partial Evaluation
- Eighth International Symposium on Programming Language Implementation and Logic Programming
"... . We illustrate a simple and e#ective solution to semantics-based compiling. Our solution is based on "type-directed partial evaluation", and -- our compiler generator is expressed in a few lines, and is e#cient; -- its input is a well-typed, purely functional definitional interpreter in the sty ..."
Abstract
-
Cited by 21 (8 self)
- Add to MetaCart
. We illustrate a simple and e#ective solution to semantics-based compiling. Our solution is based on "type-directed partial evaluation", and -- our compiler generator is expressed in a few lines, and is e#cient; -- its input is a well-typed, purely functional definitional interpreter in the style of denotational semantics; -- the output of the generated compiler is e#ectively three-address code, in the fashion and e#ciency of the Dragon Book; -- the generated compiler processes several hundred lines of source code per second. The source language considered in this case study is imperative, blockstructured, higher-order, call-by-value, allows subtyping, and obeys stack discipline. It is bigger than what is usually reported in the literature on semantics-based compiling and partial evaluation. Our compiling technique uses the first Futamura projection, i.e., we compile programs by specializing a definitional interpreter with respect to the program. Specialization is carri...
DML - A Meta-language and System for the Generation of Practical and Efficient Compilers from Denotational Specifications
- In International Conference on Computer Languages
, 1992
"... 1 DML, the Denotational Meta Language, is a specification language and a compiler generation tool for producing practical and efficient compilers from Denotational Semantics specifications. This means that code emitted from generated compilers should be product quality, and that generated compilers ..."
Abstract
-
Cited by 3 (1 self)
- Add to MetaCart
1 DML, the Denotational Meta Language, is a specification language and a compiler generation tool for producing practical and efficient compilers from Denotational Semantics specifications. This means that code emitted from generated compilers should be product quality, and that generated compilers should have reasonable compilation speed, and interface well with standard frontends and back-ends. To achieve this goal, the DML system contains two main contributions compared to previous work in this area: (1) a general algorithm for producing efficient quadruple code from continuation semantics of Algol-like languages, and (2) enhancements in the DML specification language with BNF rules for abstract syntax declarations and "semantic brackets" [| ... |] with in-line concrete syntax and pattern matching for readable and concise semantic equations. Generated quadruple code is fed into a standard optimizing back-end to obtain high quality target code. The DML system generates efficient com...
Generating an Efficient Compiler for a Data Parallel Language from a Denotational Specification
- In Lecture Notes in Computer Science
, 1994
"... . There are very few examples of the generation of efficient compilers from denotational specifications. Usually such compilers generate code which is orders of magnitude slower than from hand-written ones. However, as has been demonstrated by our DML (Denotational Meta Language) compiler generation ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
. There are very few examples of the generation of efficient compilers from denotational specifications. Usually such compilers generate code which is orders of magnitude slower than from hand-written ones. However, as has been demonstrated by our DML (Denotational Meta Language) compiler generation system, through appropriate single-threading analysis it is possible to obtain code of comparable quality to hand-written compilers. Another problem with denotational specifications is, because of their denotational nature, the need to introduce complicated power domains to model non-determinism and parallelism. In this work we have used a more practical two-level approach: use denotational specifications to model the meaning of the source language in terms of an abstract machine of low-level operations, including data-parallel operations. Then use operational semantics for the specification of this abstract machine. This paper reports experience from building a prototype compiler for a sma...

