Results 1 -
7 of
7
Generating a Compiler for a Lazy Language by Partial Evaluation
, 1992
"... Compiler generation is often emphasized as being the most important application of partial evaluation. But most of the larger practical applications have, to the best of our knowledge, been outside this field. Especially, no one has generated compilers for languages other that small languages. This ..."
Abstract
-
Cited by 20 (2 self)
- Add to MetaCart
Compiler generation is often emphasized as being the most important application of partial evaluation. But most of the larger practical applications have, to the best of our knowledge, been outside this field. Especially, no one has generated compilers for languages other that small languages. This paper describes a large application of partial evaluation where a realistic compiler was generated for a strongly typed lazy functional language. The language, that was called BAWL, was modeled after the language in Bird and Wadler [BW88] and is a combinator language with pattern matching, guarded alternatives, local definitions and list comprehensions. The paper describes the most important techniques used, especially the binding time improvements needed in order to get small and efficient target programs. Finally, the performance of the compiler is compared with two compilers for similar languages: Miranda and LML. Keywords Compiler generation, partial evaluation, binding time improvemen...
Effective Specialization of Realistic Programs via Use Sensitivity
, 1997
"... In order to exploit specialization opportunities that exist in programs written by researchers outside of the programming language community, a partial evaluator needs to effectively treat existing realistic applications. Our empirical studies have demonstrated real-sized applications extensively us ..."
Abstract
-
Cited by 18 (6 self)
- Add to MetaCart
In order to exploit specialization opportunities that exist in programs written by researchers outside of the programming language community, a partial evaluator needs to effectively treat existing realistic applications. Our empirical studies have demonstrated real-sized applications extensively use non-liftable values such as pointers and data structures. Therefore, it is essential that the binding-time analysis accurately treats nonliftable values. To achieve this accuracy, we introduce the notion of use sensitivity, and present a use-sensitive binding-time analysis for C programs which is obtained by a forward analysis followed by a backward analysis. This analysis has been implemented and integrated into our partial evaluator for C, called Tempo. To validate the effectiveness of our analysis and demonstrate that use sensitivity is critical to obtain highly-specialized programs, we have conducted experimental studies on various components of existing operating systems code. Our res...
ML pattern match compilation and partial evaluation
, 1996
"... : We derive a compiler for ML-style pattern matches. It is conceptually simple and produces reasonably good compiled matches. The derivation is inspired by the instrumentation and partial evaluation of naive string matchers. Following that paradigm, we first present a general and naive ML pattern ma ..."
Abstract
-
Cited by 10 (1 self)
- Add to MetaCart
: We derive a compiler for ML-style pattern matches. It is conceptually simple and produces reasonably good compiled matches. The derivation is inspired by the instrumentation and partial evaluation of naive string matchers. Following that paradigm, we first present a general and naive ML pattern matcher, instrument it to collect and exploit extra information, and show that partial evaluation of the instrumented general matcher with respect to a given match produces an efficient specialized matcher. We then discard the partial evaluator and show that a match compiler can be obtained just by slightly modifying the instrumented general matcher. The resulting match compiler is interesting in its own right, and naturally detects inexhaustive matches and redundant match rules. 1 Introduction Consel and Danvy [3] studied a general string matcher, taking two inputs: a pattern string to look for, and an object string to look in. The matcher finds the first occurrence (if any) of the pattern ...
Realistic Compilation by Partial Evaluation
- In ACM SIGPLAN ’96 Conference On Programming Language Design and Implementation
, 1996
"... Two key steps in the compilation of strict functional languages are the conversion of higher-order functions to data structures (clo- sures) and the transformation to tail-recursive style. We show how to perform both steps at once by applying first-order offline partial evaluation to a suitable inte ..."
Abstract
-
Cited by 8 (1 self)
- Add to MetaCart
Two key steps in the compilation of strict functional languages are the conversion of higher-order functions to data structures (clo- sures) and the transformation to tail-recursive style. We show how to perform both steps at once by applying first-order offline partial evaluation to a suitable interpreter. The resulting code is easy to transliterate to low-level C or native code. We have implemented the compilation to C; it yields a performance comparable to that of other modern Scheme-to-C compilers. In addition, we have integrated various optimizations such as constant propagation, higherorder removal, and arity raising simply by modifying the underlying interpreter. Purely first-order methods suffice to achieve the transformations. Our approach is an instance of semantics-directed compiler generation.
A Self-Applicable Partial Evaluator for ASM
, 2000
"... This paper presents an offline partial evaluator for Abstract State Machines. Self-application is possible by means of a simplified version of the partial evaluator written in ASM itself. Using self-application, we have generated compilers for small languages from their interpreter definitions. We a ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
This paper presents an offline partial evaluator for Abstract State Machines. Self-application is possible by means of a simplified version of the partial evaluator written in ASM itself. Using self-application, we have generated compilers for small languages from their interpreter definitions. We also present techniques for describing the semantics of programming languages, in a way suitable for partial evaluation.
An ASM Implementation of a Self-Applicable Partial Evaluator
, 2000
"... Partial evaluation is a technique for specializing programs with respect to parts of their input. We describe an offline partial evaluator mixASM for Abstract State Machines, written in the ASM language itself. The partial evaluator is self-applicable, so some problems related to self-application ar ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
Partial evaluation is a technique for specializing programs with respect to parts of their input. We describe an offline partial evaluator mixASM for Abstract State Machines, written in the ASM language itself. The partial evaluator is self-applicable, so some problems related to self-application are discussed. This work concentrates on the implementation of mixASM , presenting all algorithms in detail.
Design, Analysis and Reasoning about Tools: Abstracts from the Third Workshop
, 1993
"... s from the Third Workshop Flemming Nielson (editor) October 1993 1 Introduction The third DART workshop took place on Thursday August l9th and Friday August 20th at the Department of Computer Science (DIKU) at the University of Copenhagen; it was organized by Mads Rosendahl and others at DIKU, and ..."
Abstract
- Add to MetaCart
s from the Third Workshop Flemming Nielson (editor) October 1993 1 Introduction The third DART workshop took place on Thursday August l9th and Friday August 20th at the Department of Computer Science (DIKU) at the University of Copenhagen; it was organized by Mads Rosendahl and others at DIKU, and Torben Amtoft and Susanne Brønberg helped producing this report. The first day comprised survey presentations whereas the second contained more research oriented talks. The primary aim of the workshop was to increase the awareness of DART participants for each other's work, to stimulate collaboration between the di#erent groups, and to inform Danish industry about the skills possessed by the groups. The DART project started in March 1991 (prematurely terminating a smaller project on Formal Implementation, Transformation and Analysis of Programs) and is funded by the Danish Research Councils as part of the Danish Research Programme on Informatics. To date it has received about 8 million Danis...

