On the mechanics of metasystem hierarchies in program transformation

  • Robert Glück
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1048)


Self-applicable partial evaluators have been used for more than a decade for generating compilers and other program generators, but it seems hard to reason about the mechanics of hierarchies of program transformers and to describe applications that go beyond the ‘classical’ Futamura projections. This paper identifies and clarifies foundational issues involved in multi-level metasystem hierarchies. After studying the role of abstraction, encoding, and metasystem transition, the Futamura projections are reexamined and problems of their practical realization are discussed. Finally, preliminary results using a multi-level metaprogramming environment for self-application are reported. Connections between logic programming and metacomputation are made.


program transformation metacomputation metasystem transition self-application program inversion program specialization 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Sergei M. Abramov. Metacomputation and logic programming. Programmirovanie, (3):31–44, 1991. (In Russian).Google Scholar
  2. 2.
    Jonas Barklund. Metaprogramming in logic. Technical Report 80, Uppsala University, Dept. of Computing Science, 1994. To be published in Encyclopedia of Computer Science and Technology, Marcell Dekker, New York.Google Scholar
  3. 3.
    Jonas Barklund, Katrin Boberg, and Pierangelo Dell'Acqua. A basis for a multilevel metalogic programming language. In L. Fribourg and F. Turini, editors, Logic Program Synthesis and Transformation — Meta-Programming in Logic. Proceedings, volume 883 of Lecture Notes in Computer Science, pages 262–275. Springer-Verlag, 1994.Google Scholar
  4. 4.
    Lars Birkedal and Morten Welinder. Hand-writing program generator generators. In M. Hermenegildo and J. Penjam, editors, Programming Language Implementation and Logic Programming. Proceedings, volume 844 of Lecture Notes in Computer Science, pages 198–214. Springer-Verlag, 1994.Google Scholar
  5. 5.
    Antony F. Bowers and Corin A. Gurr. Towards fast and declarative metaprogramming. In K. Apt and F. Turini, editors, Meta-Logics and Logic Programming, Logic Programming, pages 137–166. MIT Press, 1995.Google Scholar
  6. 6.
    Charles Consel and Olivier Danvy. From interpreting to compiling binding times. In N. D. Jones, editor, ESOP '90, volume 432 of Lecture Notes in Computer Science, pages 88–105. Springer-Verlag, 1990.Google Scholar
  7. 7.
    Stefania Costantini and Gaetano Lanzarone. A metalogic programming language. In G. Levi and M. Martelli, editors, Proceedings Sixth International Conference on Logic Programming, pages 218–233. MIT Press, 1989.Google Scholar
  8. 8.
    Yoshihiko Futamura. Partial evaluation of computing process — an approach to a compiler-compiler. Systems, Computers, Controls, 2(5):45–50, 1971.Google Scholar
  9. 9.
    Robert Glück. Towards multiple self-application. In Proceedings of the Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pages 309–320. ACM Press, 1991.Google Scholar
  10. 10.
    Robert Glück. On the generation of specializers. Journal of Functional Programming, 4(4):499–514, 1994.Google Scholar
  11. 11.
    Robert Glück and Jesper Jørgensen. Efficient multi-level generating extensions for program specialization. In S.D. Swierstra and M. Hermenegildo, editors, Programming Languages: Implementations, Logics and Programs (PLILP'95), volume 982 of Lecture Notes in Computer Science, pages 259–278. Springer-Verlag, 1995.Google Scholar
  12. 12.
    Robert Glück and Andrei V. Klimov. Metasystem transition schemes in computer science and mathematics. World Futures: the Journal of General Evolution, 45:213–243, 1995.Google Scholar
  13. 13.
    Patricia Hill and John Gallagher. Meta-programming in logic programming. Technical Report 94.22, School of Computer Studies, University of Leeds, 1994. To be published in Handbook of Logic in Artificial Intelligence and Logic Programming, Vol. V. Oxford University Press.Google Scholar
  14. 14.
    Patricia Hill and John W. Lloyd. Analysis of meta-programs. In H. D. Abramson and M. H. Rogers, editors, Meta-Programming in Logic Programming. Proceedings Meta'88, pages 23–52. MIT Press, 1989.Google Scholar
  15. 15.
    Patricia Hill and John W. Lloyd. The Gödel Programming Language. MIT Press, Cambridge, Massachusetts, 1994.Google Scholar
  16. 16.
    Neil D. Jones, Carsten K. Gomard, and Peter Sestoft. Partial Evaluation and Automatic Program Generation. Prentice-Hall, 1993.Google Scholar
  17. 17.
    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, volume 202 of Lecture Notes in Computer Science, pages 124–140. Springer-Verlag, 1985.Google Scholar
  18. 18.
    Michael Leuschel and Bern Martens. Partial deduction of the ground representation and its application to integrity checking. In J.W. Lloyd, editor, Logic Programming: Proceedings of the 1995 International Symposium, Logic Programming, pages 495–509. MIT Press, 1995.Google Scholar
  19. 19.
    John W. Lloyd and J. C. Shepherdson. Partial evaluation in logic programming. Journal of Logic Programming, 11(3–4):217–242, 1991.Google Scholar
  20. 20.
    Bern Martens and Danny De Schreye. Two semantics for definite meta-programs, using the non-ground representation. In K. Apt and F. Turini, editors, Meta-Logics and Logic Programming, Logic Programming, pages 57–81. MIT Press, Cambridge, Massachusetts, 1995.Google Scholar
  21. 21.
    Bern Martens and Danny De Schreye. Why untyped non-ground metaprogramming is not (much of) a problem. Journal of Logic Programming, 22(1):47–99, 1995.Google Scholar
  22. 22.
    Leon Sterling and Ehud Shapiro. The Art of Prolog. MIT Press, Cambridge, Massachusetts, 1986.Google Scholar
  23. 23.
    Valentin F. Turchin. The Phenomenon of Science. Columbia University Press, New York, 1977.Google Scholar
  24. 24.
    Valentin F. Turchin. The language Refal, the theory of compilation and metasystem analysis. Courant Computer Science Report 20, Courant Institute of Mathematical Sciences, New York University, 1980.Google Scholar
  25. 25.
    Valentin F. Turchin. The concept of a supercompiler. Transactions on Programming Languages and Systems, 8(3):292–325, 1986.Google Scholar
  26. 26.
    Valentin F. Turchin. Refal-5, Programming Guide and Reference Manual. New England Publishing Co., Holyoke, Massachusetts, 1989.Google Scholar
  27. 27.
    Valentin F. Turchin and Andrei P. Nemytykh. Metavariables: their implementation and use in program transformation. Technical Report CSc. TR 95-012, City College of the City University of New York, 1995.Google Scholar
  28. 28.
    Frank van Harmelen. Definable naming relations in meta-level systems. In A. Pettorossi, editor, Meta-Programming in Logic. Proceedings, volume 649 of Lecture Notes in Computer Science, pages 89–104. Springer-Verlag, 1992.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1996

Authors and Affiliations

  • Robert Glück
    • 1
  1. 1.DIKU, Department of Computer ScienceUniversity of CopenhagenCopenhagen ØDenmark

Personalised recommendations