Skip to main content

Generating transformers for deforestation and supercompilation

  • Conference paper
  • First Online:
Book cover Static Analysis (SAS 1994)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 864))

Included in the following conference series:

Abstract

Our aim is to study how the interpretive approach — inserting an interpreter between a source program and a program specializer — can be used to improve the transformation of programs and to automatically generate program transformers by self-application of a program specializer.

We show that a few semantics-preserving transformations applied to a straightforward interpretive definition of a first-order, call-by-name language are sufficient to generate Wadler's deforestation algorithm and a version of Turchin's supercompiler using a partial evaluator. The transformation is guided by the need to binding-time improve the interpreters.

Supported by an Erwin-Schrödinger-Fellowship of the Austrian Science Foundation (FWF) under grant J0780 & J0964.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Rod M. Burstall, and John Darlington. A transformation system for developing recursive programs. Journal of the ACM, 24(1):44–67, 1977.

    Article  Google Scholar 

  2. Anders Bondorf. Compiling laziness by partial evaluation. In [JHH91]. Springer-Verlag, August 1991., pages 9–22, 1991.

    Google Scholar 

  3. Anders Bondorf. Similix 5.0 Manual. DIKU, University of Copenhagen, Denmark, May 1993. Included in Similix distribution, 82 pages.

    Google Scholar 

  4. Yoshihiko Futamura. Partial evaluation of computing process — an approach to a compiler-compiler. Systems, Computers, Controls, 2(5):45–50, 1971.

    Google Scholar 

  5. Robert Glück and Jesper Jørgensen. Generating optimizing specializers. In IEEE International Conference on Computer Languages, pages 183–194. IEEE Computer Society Press, 1994.

    Google Scholar 

  6. Robert Glück and Andrei V. Klimov. Occam's razor in metacomputation: the notion of a perfect process tree. In P. Cousot, M. Falaschi, G. Filè, and G. Rauzy, editors, Static Analysis. Proceedings. Lecture Notes in Computer Science, Vol. 724, pages 112–123. Springer-Verlag, 1993.

    Google Scholar 

  7. Robert Glück. On the generation of S→R-specializers. Technical report, University of Technology Vienna, 1991. (Presented at the NYU Partial Computation and Program Analysis Day. June 21, 1991, New York).

    Google Scholar 

  8. Robert Glück. On the generation of specializers. Journal of Functional Programming, 4(3):(to appear), 1994.

    Google Scholar 

  9. Carsten K. Gomard. A self-applicable partial evaluator for the lambda calculus: correctness and pragmatics. ACM TOPLAS, 14(2):147–172, 1992.

    Article  Google Scholar 

  10. Neil D. Jones, Carsten K. Gomard, and Peter Sestoft. Partial Evaluation and Automatic Program Generation. Prentice-Hall, 1993.

    Google Scholar 

  11. Simon L. Peyton Jones, Graham Hutton, and Carsten Kehler Holst, editors. Functional Programming, Glasgow 1990. Workshops in Computing. Springer-Verlag, August 1991.

    Google Scholar 

  12. Jesper Jørgensen. Generating a pattern matching compiler by partial evaluation. In [JHH91], pages 177–195, 1991.

    Google Scholar 

  13. Jesper Jørgensen. Generating a compiler for a lazy language by partial evaluation. In Nineteenth Annual ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages. Albuquerque, New Mexico, pages 258–268, January 1992.

    Google Scholar 

  14. Neil D. Jones, Peter Sestoft, and Harald Søndergaard. An experiment in partial evaluation: the generation of a compiler generator. In J.-P. Jouannaud, editor, Rewriting Techniques and Applications, Dijon, France. Lecture Notes in Computer Science 202, pages 124–140. Springer-Verlag, 1985.

    Google Scholar 

  15. Neil D. Jones, Peter Sestoft, and Harald Søndergaard. Mix: a self-applicable partial evaluator for experiments in compiler generation. LISP and Symbolic Computation, 2(1):9–50, 1989.

    Article  Google Scholar 

  16. David Sands. Total correctness and improvement in the transformation of functional programs. Unpublished, May 1994.

    Google Scholar 

  17. Peter Sestoft. Automatic call unfolding in a partial evaluator. In Dines Bjørner, Andrei P. Ershov, and Neil D. Jones, editors, Partial Evaluation and Mixed Computation, pages 485–506. North-Holland, 1988.

    Google Scholar 

  18. Morten Heine Sørensen, Robert Glück, and Neil D. Jones. Towards unifying partial evaluation, deforestation, supercompilation, and GPC. In Donald Sannella, editor, Programming Languages and Systems — ESOP'94. Proceedings, volume 788 of Lecture Notes in Computer Science, pages 485–500, Edinburgh, Scotland, 1994. Springer-Verlag.

    Google Scholar 

  19. Valentin F. Turchin. The use of metasystem transition in theorem proving and program optimization. In J. W. de Bakker, and J. van Leeuwen, editors, Automata, Languages and Programming, volume 85 of Lecture Notes in Computer Science, pages 645–657, Noordwijkerhout, Netherlands, 1980. Springer-Verlag.

    Google Scholar 

  20. Valentin F. Turchin. The concept of a supercompiler. Transactions on Programming Languages and Systems, 8(3):292–325, 1986.

    Article  Google Scholar 

  21. Valentin F. Turchin. Program transformation with metasystem transitions. Journal of Functional Programming, 3(3):283–313, 1993.

    Google Scholar 

  22. Philip Wadler. Deforestation: transforming programs to eliminate trees. Theoretical Computer Science, 73:231–248, 1990.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Baudouin Le Charlier

Rights and permissions

Reprints and permissions

Copyright information

© 1994 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Glück, R., Jørgensen, J. (1994). Generating transformers for deforestation and supercompilation. In: Le Charlier, B. (eds) Static Analysis. SAS 1994. Lecture Notes in Computer Science, vol 864. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-58485-4_57

Download citation

  • DOI: https://doi.org/10.1007/3-540-58485-4_57

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-58485-8

  • Online ISBN: 978-3-540-49005-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics