Skip to main content
Log in

On the degeneration of program generators by program composition

  • Published:
New Generation Computing Aims and scope Submit manuscript

Abstract

One of the main discoveries in the seventies was that the concept of a generating extension covers a very wide class of apparently different program generators. Program specialization, or partial evaluation, is powerful because it provides uniform techniques for the automatic implementation of generating extensions from ordinary programs. The Futamura projections stand as the cornerstone of the development of program specialization.

This paper takes the idea of the Futamura projections further. Threedegeneration projections are formulated which tell us how to achieve the reverse goal by program composition, namely turning a generating extension into an ordinary program. The fact that program composition can invert the effect of program specialization shows that these projections are dual in a sense. The degeneration projections complete a missing link between programs and generating extensions and allow for novel applications of program transformation.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Ershov, A. P., “On the Essence of Compilation,” inFormal Description of Programming Concepts (E. J. Neuhold, ed.), North-Holland, pp. 391–420, 1978.

  2. Futamura, Y., “Partial Computation of Programs,” inRIMS Symposia on Software Science and Engineering (E. Goto, K. Furukawa R. Nakajima, I. Nakata, and A. Yonezawa, eds.), Springer-Verlag, pp. 1–35, 1983.

  3. Bjørner, D., Ershov, A. P., and Jones, N. D. (eds.),Paritial Evaluation and Mixed Computation, North-Holland, 1988.

  4. Jones, N. D., Gomard, C. K., and Sestoft, P.,Partial Evaluation and Automatic Program Generation, Prentice-Hall, 1993.

  5. Danvy, O., Glück, R., and Thiemann, P. (eds.),Partial Evaluation, volume 1110 of Lecture Notes in Computer Science, Springer-Verlag, 1996.

  6. Futamura, Y., “Partial Evaluation of Computing Process—An Approach to a Compiler-Compiler,”Systems, Computers, Controls, 2, 5, pp. 45–50, 1971.

    Google Scholar 

  7. Turchin, V. F., “The Concept of a Supercompiler,”Transactions on Programming Languages and Systems, 8, 3, pp. 292–325, 1986.

    Article  MATH  MathSciNet  Google Scholar 

  8. Wadler, P., “Deforestation: Transforming Programs to Eliminate Trees,”Theoretical Computer Science, 73, pp. 231–248, 1990.

    Article  MATH  MathSciNet  Google Scholar 

  9. Fegaras, L., Sheard, T., and Zhou, T., “Improving Programs Which Recurse over Multiple Inductive Structures,” inACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation, Orlando, Florida, pp. 21–32, 1994.

  10. Takano, A. and Meijer, E., “Shortcut Deforestation in Calculational Form,” inConference on Functional Programming Languages and Computer Architecture, ACM Press, pp. 306–313, 1995.

  11. Turchin, V. F., “Ehkvivalentnye preobrazovanija rekursivnykh funkcij na Refale (Equivalent transformations of recursive functions defined in Refal),” inTeorija Jazykov i Metody Programmirovanija (Proceedings of the Symposium on the Theory of Languages and Programming Methods), pp. 31–42, 1972. [In Russian]

  12. Bratman, H., “An Alternate Form of the ‘UNCOL Diagram,’”Communications of the ACM, 4, 3, p. 142, 1961.

    Article  Google Scholar 

  13. Earley, J. and Sturgis, H., “A Formalism for Translator Interactions,”Communications of the ACM, 13, 10, pp. 607–617, 1970.

    Article  MATH  Google Scholar 

  14. Glück, R. and Klimov, A. V., “Metasystem Transition Schemes in Computer Science and Mathematics,”World Futures, 45, pp. 213–243, 1995.

    Article  Google Scholar 

  15. Glück, R., “On the Mechanics of Metasystem Hierarchies in Program Transformation,” inLogic Program Synthesis and Transformation, volume 1048 of Lecture Notes in Computer Science (M. Proietti, ed.), Springer-Verlag, pp. 234–251, 1996.

  16. Turchin, V. F., “Metacomputation: Metasystem Transitions plus Supercompilation,” inPartial Evaluation, volume 1110 of Lecture Notes in Computer Science (O. Danvy, R. Glück, and P. Thiemann, ed.), Springer-Verlag, pp. 481–509, 1996.

  17. Glück, R. and Jørgensen, J., “Efficient Multi-Level Generating Extensions for Program Specialization,” inProgramming Languages: Implementations, Logics and Programs (PLILP’95) (M. Hermenegildo and S. D. Swierstra, eds.),volume 982 of Lecture Notes in Computer Science, Springer-Verlag, pp. 259–278, 1995.

  18. Turchin, V. F.,The Phenomenon of Science, Columbia University Press, New York, 1977.

    Google Scholar 

  19. Tofte, M.,Compiler Generators, volume 19 of EATCS Monographs on Theoretical Computer Science, Springer-Verlag, 1990.

  20. Glück, R., “On the Generation of Specializers,”Journal of Functional Programming, 4, 4, pp. 499–514, 1994.

    Article  Google Scholar 

  21. Bondorf, A., “Automatic Autoprojection of Higher Order Recursive Equations,”Science of Computer Programming, 17, 1–3, pp. 3–34, 1991.

    Article  MATH  Google Scholar 

  22. Turchin, V. F., “Program Transformation with Metasystem Transitions,”Journal of Functional Programming, 3, 3, pp. 283–313, 1993.

    Article  Google Scholar 

  23. Abramov, S. M.,Metavychislenija i ikh prilozhenija (Metacomputation and its Applications), Nauka, Moscow, 1995, [In Russian]

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Additional information

This work was partly supported by the project “Design, Analysis and Reasoning about Tools” funded by the Danish Natural Sciences Research Council. The first author was also supported by an Erwin-Schrödinger-Fellowship of the Austrian Science Foundation (FWF) under grant J0780 & J0964; the second author partly by the Russian Basic Research Foundation grant 93-01-00628 & 96-01-01315, the US Office of Naval Research grant N00014-96-1-0800, and the US Civilian Research and Development Foundation grant RMI-254.

Robert Glück: He is an associate professor of Computer Science at the University of Copenhagen. He received his M. Sc. and Ph. D. degrees in 1986 and 1991 from the University of Technology in Vienna, where he also worked as assistant professor. He was research assistant at the City University of New York and twice received the Erwin-Schrödinger-Fellowship of the Austrian Science Foundation. His research interests include advanced programming languages, theory and practice of program transformation, and metaprogramming.

Andrei V. Klimov: He is a senior researcher at the Keldysh Institute of Applied Mathematics, the Russian Academy of Sciences. After receiving his M.Sc. degree from Moscow State University in 1976, he worked in a research institute in electronic industry, where developed software for microprocessors. Since 1983, when he changed to Keldysh Institute, his main research interests are functional programming, theory and methods of program transformation and optimization, and their application to practical programming languages and problems.

About this article

Cite this article

Glück, R., Klimov, A. On the degeneration of program generators by program composition. NGCO 16, 75–95 (1998). https://doi.org/10.1007/BF03037321

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF03037321

Keywords

Navigation