Hand-Writing Program Generator Generators

@inproceedings{Birkedal1994HandWritingPG,
  title={Hand-Writing Program Generator Generators},
  author={Lars Birkedal and Morten Welinder},
  booktitle={PLILP},
  year={1994}
}
In this paper we argue that hand-writing a program generator generator has a number of advantages compared to generating a program generator generator by self-application of a partial evaluator. We show the basic principles of how to construct a program generator generator by presenting a program generator generator for a skeletal language, and we argue that it is not more difficult to use the direct approach than the indirect approach. Moreover, we report on some promising experiments made… 
Program Generation with Class
TLDR
A minor extension of Gofer’s type reconstruction mechanism that can automatically infer binding times and exploit multi-parameter constructor classes which are part of the type system to construct program generators that are binding-time polymorphic.
An Automatic Program Generator for Multi-Level Specialization
TLDR
This paper investigates the theoretical limitations and practical problems of standard specialization tools, presents multi-level specialization, and demonstrates that, in combination with the cogen approach, it is far more practical than previously supposed.
A Compiler Generator for Constraint Logic Programs
TLDR
This paper presents the basic specialisation technique for CLP(Q) programs and shows how to handle non-declarative features as well and presents an implemented system along with experimental results.
Module-sensitive program specialisation
We present an approach for specialising large programs, such as programs consisting of several modules, or libraries. This approach is based on the idea of using a compiler generator (cogen) for
Ecient Specialisation in Prolog Using a Hand-Written Compiler Generator
TLDR
This paper develops a generic offline partial deduction technique for pure logic programs, notably supporting partially instantiated datastructures via binding types and shows how the cogen can be extended to directly support a large part of Prolog’s declarative and non-declarative features and how semi-online specialisation can be efficiently integrated.
A Transformation-Based Foundation for Semantics-Directed Code Generation
TLDR
This dissertation proposes a transformation-based foundation for deriving compilers from semantic specifications in the form of four rules that give apriori advice for staging, and allow explicit compiler derivation that would be less succinct with partial evaluation.
Program generation, termination, and binding-time analysis
TLDR
Recent progress towards automatically solving the termination problem is described, first for individual programs, and then for specializers and "generating extensions," the program generators that most offline partial evaluators produce.
Offline specialisation in Prolog using a hand-written compiler generator
TLDR
It is demonstrated that the cogen approach is also applicable to the specialisation of logic programs (called partial deduction) and leads to effective specialisers, and using good binding-time annotations, the speed-ups of the specialised programs are comparable to thespeed-ups obtained with online specialisers.
Contents 1 Introduction 1 2 Oo-line Partial Deduction 3
The so called cogen approach to program specialisation writing a compiler generator instead of a specialiser has been used with considerable success in partial evaluation of both functional and
Specialising Interpreters Using Offline Partial Deduction
TLDR
New binding-types are presented, and it is shown how they can be used to effectively specialise a wide variety of interpreters and how to achieve Jones-optimality in a systematic way for several interpreters.
...
...

References

SHOWING 1-10 OF 39 REFERENCES
Mix: A self-applicable partial evaluator for experiments in compiler generation
TLDR
The paper gives an introduction to partial evaluation and describes a fully automatic though experimental partial evaluator, called mix, able to generate stand-alone compilers as well as a compiler generator.
A Partial Evaluator, and its Use as a Programming Tool
Compiling with Continuations
TLDR
This book shows how continuation-passing style is used as an intermediate representation to perform optimizations and program transformations to create practical optimizing compilers for modern languages like ML.
Automatic Online Partial Evaluation
We have solved the problem of constructing a fully automatic online program specializer for an untyped functional language (specifically, the functional subset of Scheme). We designed our
A Strongly-Typed Self-Applicable Partial Evaluator
TLDR
What is believed to be the first successful attempt to produce a self-applicable partial evaluator written in and for a strongly-typed language and, in the process, some theoretical aspects of partial evaluation raised by strong-typing are discussed.
Partial evaluation and automatic program generation
TLDR
This paper presents a guide to the literature the self-applicable scheme specializer, a partial evaluator for a subset of scheme for a first-order functional languages.
Deferred Compilation: The Automation of Run-Time Code Generation
This paper describes deferred compilation, an alternative and complement to compile-time program analysis and optimization. By deferring aspects of compilation to run time, exact information about
Efficient Algebraic Operations on Programs
TLDR
A new notation is introduced to describe thetypes of symbolic operations, one that makes an explicit distinction between the types of program texts and the values they denote, which leads to natural definitions of what it means for an interpreter or compiler to be type correct—a tricky problem in a multilanguage context.
Improving binding times without explicit CPS-conversion
TLDR
This paper has implemented a cps-based program specializer, which is integrated in the partial evaluator Similix 4.0 that handles partially static data structures and shows how such improvements can be obtained without affecting the source program.
Constructor specialization
TLDR
This paper argues that it is possible to get good results from partial evaluation in cases where the traditional methods fail to produce satisfactory results, and proposes to alleviate this by means of constructor specialization.
...
...