Hand-Writing Program Generator Generators

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 with a prototype implementation of a program generator generator for most of the Standard ML Core Language. To the best of our knowledge, our prototype is the first succesfully implemented hand-written program generator generator for a statically typed language.

[1]  Anders Bondorf,et al.  Automatic Autoprojection of Higher Order Recursive Equations , 1990, Sci. Comput. Program..

[2]  Torben Æ. Mogensen Constructor specialization , 1993, PEPM '93.

[3]  Anders Bondorf,et al.  Improving binding times without explicit CPS-conversion , 1992, LFP '92.

[4]  Uwe Meyer Techniques for partial evaluation of imperative languages , 1991 .

[5]  Andrew W. Appel,et al.  Compiling with Continuations , 1991 .

[6]  Robin Milner,et al.  Commentary on standard ML , 1990 .

[7]  Flemming Nielson,et al.  Automatic Binding Time Analysis for a Typed lambda-Calculus , 1988, Sci. Comput. Program..

[8]  Peter Lee,et al.  Deferred Compilation: The Automation of Run-Time Code Generation , 1993 .

[9]  Uwe Meyer,et al.  Techniques for partial evaluation of imperative languages , 1991, PEPM '91.

[10]  J. Jørgensen,et al.  Efficient Analyses for Realistic Off-Line Partial Evaluation : Extended Version , 1993 .

[11]  Erik Ruf,et al.  Automatic Online Partial Evaluation , 1991, FPCA.

[12]  Flemming Nielson,et al.  Automatic binding time analysis for a typed λ-calculus , 1988, POPL '88.

[13]  Fritz Henglein,et al.  Efficient Type Inference for Higher-Order Binding-Time Analysis , 1991, FPCA.

[14]  Neil D. Jones,et al.  Mix: A self-applicable partial evaluator for experiments in compiler generation , 1989, LISP Symb. Comput..

[15]  Erik Sandewall,et al.  A Partial Evaluator, and its Use as a Programming Tool , 1976, Artif. Intell..

[16]  Peter Sestoft,et al.  Partial evaluation and automatic program generation , 1993, Prentice Hall international series in computer science.

[17]  Neil D. Jones,et al.  A partial evaluator for the untyped lambda-calculus , 1991, Journal of Functional Programming.

[18]  John Launchbury,et al.  A Strongly-Typed Self-Applicable Partial Evaluator , 1991, FPCA.

[19]  Anne De Niel Self-applicable partial evaluation of polymorphically typed functional languages , 1993 .

[20]  Robin Milner,et al.  Definition of standard ML , 1990 .

[21]  Neil D. Jones,et al.  Efficient Algebraic Operations on Programs , 1991, AMAST.

[22]  Aleksy Schubert,et al.  The EML Kit Version 1 , 1996 .