Generating optimizing specializers

We propose a new method for improving the specialization of programs by inserting an interpreter between a subject program and a specializer. We formulate three specializer projections which enable us to generate specializers from interpreters. The goal is to provide a new way to control the specialization of programs, and we report the first practical results. This is a step towards the automatic production of specializers. Using an existing, self-applicable partial evaluator we succeeded in generating a stand-alone specializer for a first-order functional language which is stronger than the partial evaluator used for its generation. The generated specializer corresponds to a simple supercompiler. As an example we show that the generated specializer can achieve the same speed-up effect as the Knuth, Morris and Pratt algorithm (D.E. Knuth et al., vol. 6, no. 2, 1977) by specializing a naive matcher with respect to a fixed pattern. The generated specializer is also strong enough to handle bounded static variation, a case which partial evaluators usually can not handle.<<ETX>>

[1]  Olivier Danvy,et al.  Partial Evaluation of Pattern Matching in Strings , 1989, Inf. Process. Lett..

[2]  Robert Glück,et al.  Occam's Razor in Metacompuation: the Notion of a Perfect Process Tree , 1993, WSA.

[3]  Olivier Danvy,et al.  Tutorial notes on partial evaluation , 1993, POPL '93.

[4]  Anders Bondorf Similix 5.0 Manual , 1993 .

[5]  Robert Glück,et al.  On the generation of specializers , 1994, Journal of Functional Programming.

[6]  S. A. Romanenko,et al.  A compiler generator produced by a self-applicable specializer can have a surprisingly natural and u , 1988 .

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

[8]  Donald E. Knuth,et al.  Fast Pattern Matching in Strings , 1977, SIAM J. Comput..

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

[10]  Jesper Jørgensen,et al.  Generating a compiler for a lazy language by partial evaluation , 1992, POPL '92.

[11]  Valentin F. Turchin,et al.  The concept of a supercompiler , 1986, TOPL.

[12]  Robert Glück,et al.  Application of metasystem transition to function inversion and transformation , 1990, ISSAC '90.

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

[14]  Valentin F. Turchin,et al.  Program transformation with metasystem transitions , 1993, Journal of Functional Programming.

[15]  Akihiko Takano Generalized partial computation for a lazy functional language , 1991 .

[16]  Charles Consel,et al.  New Insights into Partial Evaluation: the SCHISM Experiment , 1988, ESOP.