Abstract
This paper gives a gentle introduction to Turchin's super-compilation and its applications in metacomputation with an emphasis on recent developments. First, a complete supercompiler, including positive driving and generalization, is defined for a functional language and illustrated with examples. Then a taxonomy of related transformers is given and compared to the supercompiler. Finally, we put supercompilation into the larger perspective of metacomputation and consider three metacomputation tasks: specialization, composition, and inversion.
Preview
Unable to display preview. Download preview PDF.
References
S.M. Abramov. Metavychislenija i logicheskoe programmirovanie (Metacomputation and logic programming). Programmirovanie, 3:31–44, 1991. (In Russian).
S.M. Abramov. Metacomputation and program testing. In 1st International Workshop on Automated and Algorithmic Debugging, pp. 121–135, 1993.
S.M. Abramov. Metavychislenija i ikh prilozhenija (Metacomputation and its application). Nauka, Moscow, 1995. (In Russian).
S.M. Abramov and N.V. Kondratiev. Kompiljator, osnovannyj na metode chastichnykh vychislenij (A compiler based on the method of partial evaluation). In Nekotorye voprosy prikladnojmatematiki i programmnogo obespechenija EhVB, pp. 66–69. Moscow State University, Moscow, 1982. (in Russian).
M. Alpuente, M. Falaschi, and G. Vidal. Narrowing-driven partial evaluation of functional logic programs. In European Symposium on Programming-ESOP '96, LNCS. Springer-Verlag, 1996. To appear.
L. Beckman, A. Haraldson, ö. Oskarsson, and E. Sandewall. A partial evaluator and its use as a programming tool. Artificial Intelligence, 7:319–357, 1976.
R. Bird and P.L Wadler. Introduction to Functional Programming. Prentice-Hall, 1988.
D. Bjørner, A.P. Ershov, and N.D. Jones, editors. Partial Evaluation and Mixed Computation. North-Holland, Amsterdam, 1988.
R. Bol. Loop checking in partial deduction. Journal of Logic Programming, 16(1&2):25–46, 1993.
M.A. Bulyonkov. Polyvariant mixed computation for analyzer programs. Acta Informatica, 21:473–484, 1984.
R.M. Burstall and J. Darlington. A transformation system for developing recursive programs. Journal of the Association for Computing Machines, 24(1):44–67, 1977.
C.-L. Chang and R.C.-T. Lee. Symbolic Logic and Mechanical Theorem Proving. Computer Science and Applied Mathematics. Academic Press, 1973.
C. Consel and O. Danvy. For a better support of static data flow. In J. Hughes, editor, Functional Programming and Computer Architecture, vol. 523 of LNCS, pp. 495–519. Springer-Verlag, 1991.
C. Consel and O. Danvy. Tutorial notes on partial evaluation. In ACM Symposium in Principles of Programming Languages, pages 493–501. ACM Press, 1993.
C. Consel and S.C. Khoo. Parameterized partial evaluation. ACM TOPLAS, 15(3):463–493, 1993.
O. Danvy, R. Glück, and P. Thiemann, editors. Partial Evaluation. Proceedings. LNCS. Springer-Verlag, 1996. To appear.
N. Dershowitz and J.-P. Jouannaud. Rewrite systems. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science, pp. 244–320. Elsevier, 1992.
J. Dixon. The specializer, a method of automatically writing computer programs. Technical report, Division of Computer Research and Technology, National Institute of Health, Bethesda, Maryland, 1971.
A.P. Ershov. On the partial computation principle. Information Processing Letters, 6(2):38–41, 1977.
A.P. Ershov. On the essence of compilation. In E.J. Neuhold, editor, Formal Description of Programming Concepts, pp. 391–420. North-Holland, 1978.
A. Ferguson and P.L. Wadler. When will deforestation stop? In 1988 Glasgow Workshop on Functional Programming, pages 39–56, 1988.
S.N. Florencev, Y.V. Oljunin, and V.F. Turchin. (An efficient interpreter for the language Refal). Preprint, Institute of Applied Mathematics, Academy of Sciences of the USSR, Moscow, 1969. (In Russian).
Y. Futamura. Partial evaluation of computing process — an approach to a compiler-compiler. Systems, Computers, Controls, 2(5):45–50, 1971.
Y. Futamura. Partial computation of programs. In E. Goto, K. Furukawa, R. Nakajima, I. Nakata, and A. Yonezawa, editors, RIMS Symposia on Software Science and Engineering, vol. 147 of LNCS, pp. 1–35, Kyoto, Japan, 1983. Springer-Verlag.
Y. Futamura. Program evaluation and generalized partial computation. In International Conference on Fifth Generation Computer Systems, pp. 1–8, 1988.
J. Gallagher. Tutorial in specialisation of logic programs. In Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pp. 88–98. ACM Press, 1993.
R. Glück. Towards multiple self-application. In Proceedings of the Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pp. 309–320. ACM Press, 1991.
R. Glück. Projections for knowledge based systems. In R. Trappl, editor, Cybernetics and Systems Research'92, volume 1, pp. 535–542. World Scientific, 1992.
R. Glück. On the generation of specializers. Journal of Functional Programming, 4(4):499–514, 1994.
R. Glück. On the mechanics of metasystem hierarchies in program transformation. In M. Proietti, editor, Logic Program Synthesis and Transformation. Proceedings, vol. 1048 of LNCS, pp. 234–251. Springer-Verlag, 1996.
R. Glück and J. Jørgensen. Generating transformers for deforestation and super-compilation. In B. Le Charlier, editor, Static Analysis. Proceedings, volume 864 of LNCS, pp. 432–448, Namur, Belgium, 1994. Springer-Verlag.
R. Glück and J. 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), vol. 982 of LNCS, pp. 259–278. Springer-Verlag, 1995.
R. Glück, J. Jørgensen, B. Martens, and M.H. Sørensen. Controlling conjunctive partial deduction of definite logic programs. Technical Report CW 226, Katholieke Universiteit Leuven, 1996.
R. Glück and A.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., vol. 724 of LNCS, pp. 112–123. Springer-Verlag, 1993.
R. Glück and A.V. Klimov. Metacomputation as a tool for formal linguistic modeling. In R. Trappl, editor, Cybernetics and Systems'94, volume 2, pp. 1563–1570. World Scientific, 1994.
R. Glück and A.V. Klimov. Metasystem transition schemes in computer science and mathematics. World Futures, 45:213–243, 1995.
R. Glück and A.V. Klimov. Reduction of language hierarchies. In Proceedings of the 14th International Congress on Cybernetics, page To appear, Namur, Belgium, 1995. International Association for Cybernetics.
R. Glück and M.H. Sørensen. Partial deduction and driving are equivalent. In M. Hermenegildo and J. Penjam, editors, Programming Language Implementation and Logic Programming. Proceedings, vol. 844 of LNCS, pp. 165–181. Springer-Verlag, 1994.
R. Glück and V.F. Turchin. Application of metasystem transition to function inversion and transformation. In Proceedings of the ISSAC'90 (Tokyo, Japan), pp. 286–287. ACM Press, 1990.
R. Gurin and S.A. Romanenko. Jazyk programmirovanija Refal Pljus (The Refal Plus programming language). Intertech, Moscow, 1991. (In Russian).
P.G. Harrison. Function inversion. In Bjørner et al. [8], pp. 153–166.
J. Hatcliff and Robert Glück. Reasoning about hierarchies of online program specialization systems. In Danvy et al. [16]. To appear.
N.D. Jones. The essence of program transformation by partial evaluation and driving. In N.D. Jones, M. Hagiya, and M. Sato, editors, Logic, Language, and Computation, vol. 792 of LNCS, pp. 206–224. Springer-Verlag, 1994. Festschrift in honor of S.Takasu.
N.D. Jones, C.K. Gomard, and P. Sestoft. Partial Evaluation and Automatic Program Generation. Prentice-Hall, 1993.
N.D. Jones, P. Sestoft, and H. Søndergaard. An experiment in partial evaluation: the generation of a compiler generator. In J.-P. Jouannaud, editor, Rewriting Techniques and Applications, Dijon, France., vol. 202 of LNCS, pp. 124–140. Springer-Verlag, 1985.
N.D. Jones, P. Sestoft, and H. Søndergaard. Mix: a self-applicable partial evaluator for experiments in compiler generation. Lisp and Symbolic Computation, 2(1):9–50, 1989.
S.C. Kleene. Introduction to Metamathematics. Van Nostrand, 1952.
Andrei V. Klimov. Dynamic specialization in extended functional language with monotone objects. In Proceedings of the Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pp. 199–210. ACM Press, 1991.
A.V. Klimov and S.A. Romanenko. Metavychislitel' dlja jazyka Refal. Osnovnye ponjatija i primery. (A metaevaluator for the language Refal. Basic concepts and examples). Preprint 71, Keldysh Institute of Applied Mathematics, Academy of Sciences of the USSR, Moscow, 1987. (In Russian).
A.V. Klimov and S.A. Romanenko. Sistema programmirovanija Refal-2 dlja ES. Opisanie vkhodnogo jazyka (Programming system Refal-2 for ES computers. The source language description). Technical report, Keldysh Institute of Applied Mathematics, Academy of Sciences of the USSR, Moscow, 1987. (In Russian).
A.V. Klimov, S.A. Romanenko, and V.F. Turchin. Teoreticheskie osnovy sintaksicheskogo otozhdestvlenija v jazyke Refal (The theory of pattern matching in Refal). Preprint 13, Keldysh Institute of Applied Mathematics, Academy of Sciences of the USSR, Moscow, 1973. (In Russian).
J. Komorowski. An introduction to partial deduction. In A. Pettorossi, editor, Meta-Programming in Logic, vol. 649 of LNCS, pp. 49–69, 1992.
J. Komorowski. Special issue on partial deduction. Journal of Logic Programming, 16(1&2):1–189, 1993.
M. Leuschel, D. De Schreye, and A. de Waal. A conceptual embedding of folding into partial deduction: Towards a maximal integration. Technical Report CW 225, Katholieke Universiteit Leuven, 1995.
M. Leuschel and B. Martens. Global control for partial deduction through characteristic atoms and global trees. In Danvy et al. [16]. To appear.
J.W. Lloyd and J.C. Shepherdson. Partial evaluation in logic programming. Journal of Logic Programming, 11(3–4):217–242, 1991.
L.A. Lombardi. Incremental computation. In F. L. Alt and M. Rubinoff, editors, Advances in Computers, volume 8, pp. 247–333. Academic Press, 1967.
L.A. Lombardi and B. Raphael. Lisp as the language for an incremental computer. In E.C. Berkeley and D.G. Bobrow, editors, The Programming Language Lisp: Its Operation and Applications, pp. 204–219, Cambridge, Massachusetts, 1964. MIT Press.
B. Martens and J. Gallagher. Ensuring global termination of partial deduction while allowing flexible polyvariance. In L. Stirling, editor, International Conference on Logic Programming, pp. 597–613. MIT Press, 1995.
A.P. Nemytykh, V.A. Pinchuk, and V.F. Turchin. A self-applicable supercompiler. In Danvy et al. [16]. To appear.
K. Nielsen and M.H. Sørensen. Call-by-name CPS-translation as a binding-time improvement. In A. Mycroft, editor, Static Analysis, vol. 983 of LNCS, pp. 296–313. Springer-Verlag, 1995.
R.M. Nirenberg. A practical turing machine representation. SIGACT News, 17(3):35–44, 1986.
M. Proietti and A. Pettorossi. Unfolding — definition — folding, in this order for avoiding unnecessary variables in logic programs. In Programming Language Implementation and Logic Programming, vol. 528 of LNCS, pp. 347–358. Springer-Verlag, 1991.
G. Puebla and M. Hermenegildo. Implementation of multiple specialization in logic programs. In Proceedings of the Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pp. 77–87. ACM Press, 1995.
A.Y. Romanenko. The generation of inverse functions in Refal. In Bjørner et al. [8], pp. 427–444.
A.Y. Romanenko. Inversion and metacomputation. In Proceedings of the Symposium on Partial Evaluation and Semantics-Based Program Manipulation. (Yale University, Connecticut), pages 12–22. ACM Press, 1991.
S.A. Romanenko. Progonka dlja programm na Refale-4 (Driving for Refal-4 programs). Preprint 211, Keldysh Institute of Applied Mathematics, Academy of Sciences of the USSR, Moscow, 1987. (In Russian).
S.A. Romanenko. A compiler generator produced by a self-applicable specializer can have a surprisingly natural and understandable structure. In Bjørner et al. [8], pp. 445–463.
S.A. Romanenko. Arity raiser and its use in program specialization. In N.D. Jones, editor, ESOP'90, vol. 432 of LNCS, pages 341–360. Springer-Verlag, 1990.
D. Sands. Proving the correctness of recursion-based automatic program transformation. In P. Mosses, M. Nielsen, and M.I. Schwartzbach, editors, Theory and Practice of Software Development, vol. 915 of LNCS, pages 681–695. Springer-Verlag, 1995.
D. Sands. Total correctness by local improvement in program transformation. In 22nd Symposium on Principles of Programming Languages, pages 221–232. ACM Press, 1995.
D. Smith. Partial evaluation of pattern matching in constraint logic programming. In Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pp. 62–71. ACM Press, 1991.
M.H. Sørensen. Turchin's supercompiler revisited. Master's thesis, Department of Computer Science, University of Copenhagen, 1994. DIKU-rapport 94/17.
M.H. Sørensen and R. Glück. An algorithm of generalization in positive super-compilation. In J.W. Lloyd, editor, Logic Programming: Proceedings of the 1995 International Symposium, pp. 465–479. MIT Press, 1995.
M.H. Sørensen, R. Glück, and N.D. Jones. Towards unifying deforestation, supercompilation, partial evaluation, and generalized partial computation. In D. Sannella, editor, Programming Languages and Systems, vol. 788 of LNCS, pp. 485–500. Springer-Verlag, 1994.
M.H. Sørensen, R. Glück, and N.D. Jones. A positive supercompiler. Journal of Functional Programming, 1996. To appear.
A. Takano. Generalized partial computation using disunification to solve constraints. In M. Rusinowitch and J.L. Remy, editors, Conditional Term Rewriting Systems. Proceedings, vol. 656 of LNCS, pp. 424–428. Springer-Verlag, 1993.
V.F. Turchin. Metajazyk dlja formal'nogo opisanija algoritmicheskikh jazykov (A metalanguage for the formal description of algorithmic languages). In Cifrovaja Vychislitel'naja Tekhnika i Programmirovanie, pp. 116–124. Sovetskoe Radio, Moscow, 1966. (In Russian).
V.F. Turchin. Programmirovanie na jazyke Refal. (Programming in the language Refal). Preprint 41, 43, 44, 48, 49, Institute of Applied Mathematics, Academy of Sciences of the USSR, Moscow, 1971. (In Russian).
V.F. Turchin. Ehkvivalentnye preobrazovanija rekursivnykh funkcij na Refale (Equivalent transformations of recursive functions defined in Refal). In Teorija Jazykov i Metody Programmirovanija (Proceedings of the Symposium on the Theory of Languages and Programming Methods), pages 31–42, Kiev-Alushta, USSR, 1972. (In Russian).
V.F. Turchin. Ehkvivalentnye preobrazovanija programm na Refale (Equivalent transformations of Refal programs). Avtomatizirovannaja Sistema upravlenija stroitel'stvom. Trudy CNIPIASS, 6:36–68, 1974. (In Russian).
V.F. Turchin, The Phenomenon of Science. Columbia University Press, New York, 1977.
V.F. Turchin. A supercompiler system based on the language Refal. SIGPLAN Notices, 14(2):46–54, 1979.
V.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.
V.F. Turchin. Semantic definitions in Refal and the automatic production of compilers. In N.D. Jones, editor, Workshop on Semantics-Directed Compiler Generation, århus, Denmark, volume 94 of LNCS, pp. 441–474. Springer-Verlag, 1980.
V.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 LNCS, pp. 645–657, Noordwijkerhout, Netherlands, 1980. Springer-Verlag.
V.F. Turchin. The concept of a supercompiler. Transactions on Programming Languages and Systems, 8(3):292–325, 1986.
V.F. Turchin. A constructive interpretation of the full set theory. The Journal of Symbolic Logic, 52(1):172–201, 1987.
V.F. Turchin. The algorithm of generalization. In Bjørner et al. [8], pp. 531–549.
V.F. Turchin. Refal-5, Programming Guide and Reference Manual. New England Publishing Co., Holyoke, Massachusetts, 1989.
V.F. Turchin. The cybernetic ontology of action. Kybernetes, 22(2):10–30, 1993.
V.F. Turchin. On cybernetic epistemology. Systems Research, 10(1):3–28, 1993.
V.F. Turchin. Program transformation with metasystem transitions. Journal of Functional Programming, 3(3):283–313, 1993.
V.F. Turchin. On generalization of lists and strings in supercompilation. Technical report, City College of the City University of New York, 1995.
V.F. Turchin. Metacomputation: MST plus SCP. In Danvy et al. [16]. To appear.
V.F. Turchin, And.V. Klimov, Ark.V. Klimov, V.F. Khoroshevsky, A.G. Krasovsky, S.A. Romanenko, I.B. Shchenkov, and E.V. Travkina. Bazisnyj Refal i ego realizacija na vychislitelnykh mashinakh (Basic Refal and its implementation on computers). GOSSTROJ SSSR, CNIPIASS, Moscow, 1977. (In Russian).
V.F. Turchin and A.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.
V.F. Turchin and A.P. Nemytykh. A self-applicable supercompiler. Technical Report CSc. TR 95-010, City College of the City University of New York, 1995.
V.F. Turchin, R. Nirenberg, and D. Turchin. Experiments with a supercompiler. In Conference Record of the ACM Symposium on Lisp and Functional Programming, pp. 47–55. ACM Press, 1982.
P.L. Wadler. Deforestation: Transforming programs to eliminate intermediate trees. Theoretical Computer Science, 73:231–248, 1990. Preliminary version in ESOP'88 LNCS vol. 300.
Author information
Authors and Affiliations
Editor information
Additional information
Dedicated to V.F. Turchin on the Occasion of his 65th Birthday
Rights and permissions
Copyright information
© 1996 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Glück, R., Sørensen, M.H. (1996). A roadmap to metacomputation by supercompilation. In: Danvy, O., Glück, R., Thiemann, P. (eds) Partial Evaluation. Lecture Notes in Computer Science, vol 1110. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-61580-6_8
Download citation
DOI: https://doi.org/10.1007/3-540-61580-6_8
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-61580-4
Online ISBN: 978-3-540-70589-5
eBook Packages: Springer Book Archive