The concept of a supercompiler

A supercompiler is a program transformer of a certain type. It traces the possible generalized histories of computation by the original program, and compiles an equivalent program, reducing in the process the redundancy that could be present in the original program. The nature of the redundancy that can be eliminated by supercompilation may be various, e.g., some variables might have predefined values (as in partial evaluation), or the structure of control transfer could be made more efficient (as in lazy evaluation), or it could simply be the fact that the same variable is used more than once. The general principles of supercompilation are described and compared with the usual approach to program transformation as a stepwise application of a number of equivalence rules. It is argued that the language Refal serves the needs of supercompilation best. Refal is formally defined and compared with Prolog and other languages. Examples are given of the operation of a Refal supercompiler implemented at CCNY on an IBM/370.

[1]  Jean Vuillemin,et al.  Correct and optimal implementations of recursion in a simple programming language , 1973, J. Comput. Syst. Sci..

[2]  Jean Vuillemin Correct and Optimal Implementations of Recursion in a Simple Programming Language , 1974, J. Comput. Syst. Sci..

[3]  Daniel P. Friedman,et al.  CONS Should Not Evaluate its Arguments , 1976, ICALP.

[4]  Peter Henderson,et al.  A lazy evaluator , 1976, POPL.

[5]  Erik Sandewall,et al.  A Partial Evaluator, and its Use as a Programming Tool , 1976, Artif. Intell..

[6]  John Darlington,et al.  A Transformation System for Developing Recursive Programs , 1977, J. ACM.

[7]  V. F. Turchin,et al.  A supercompiler system based on the language REFAL , 1979, SIGP.

[8]  David A. Schmidt,et al.  Compiler generation from denotational semantics , 1980, Semantics-Directed Compiler Generation.

[9]  Valentin F. Turchin,et al.  The language refal - the theory of compilation and metasystem analysis , 1980 .

[10]  Valentin F. Turchin,et al.  Semantic definitions in REFAL and the automatic production of compilers , 1980, Semantics-Directed Compiler Generation.

[11]  Neil D. Jones Semantics-Directed Compiler Generation , 1980, Lecture Notes in Computer Science.

[12]  Andrei P. Ershov,et al.  Mixed Computation: Potential Applications and Problems for Study , 1982, Theor. Comput. Sci..

[13]  Yoshihiko Futamura,et al.  Parital Computation of Programs , 1982, RIMS Symposium on Software Science and Engineering.

[14]  Valentin F. Turchin,et al.  Experiments with a supercompiler , 1982, LFP '82.

[15]  Ralf Steinbrüggen,et al.  Program Transformation Systems , 1983, CSUR.

[16]  Nils J. Nilsson,et al.  Artificial Intelligence Prepares for 2001 , 1983, AI Mag..

[17]  Peter Sestoft,et al.  An experiment in partial evaluation: the generation of a compiler generator , 1985, SIGP.

[18]  Uday S. Reddy,et al.  Narrowing as the Operational Semantics of Functional Languages , 1985, SLP.