The Concept of a Supercompiler, 1986
نویسنده
چکیده
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.
منابع مشابه
Implementing a domain-specific multi-result supercompiler by means of the MRSC toolkit (2012)
The paper presents a simple domain-specific multi-result supercompiler for counter systems implemented by means of the MRSC toolkit. The input language of the supercompiler is a non-deterministic domain-specific language meant for specifying models of communication protocols. The implementation of this DSL is based on " embedding " and the heavy use of higher-order constructs. There are present...
متن کاملProgram Transformation with Metasystem Transitions: Experiments with a Supercompiler
Turchin's supercompilationis a program transformation technique for functional languages. A supercompiler is a program which can perform a deep transformation of programs using a principle which is similar to partial evaluation. In the present paper we use a supercompiler, which V.F. Turchin and we have described in 22], 23]. The aim of our investigation has been to show, what deep changes (w.r...
متن کاملA Java Supercompiler and Its Application to Verification of Cache-Coherence Protocols
The Java Supercompiler (JScp) is a specializer of Java programs based on the Turchin’s supercompilation method and extended to support imperative and object-oriented notions absent in functional languages. The results of successful application of the Java Supercompiler for verification of a number of parameterized models of cache-coherence protocols are reported. Protocols are modeled in Java f...
متن کاملSupercompiler HOSC: proof of correctness
The paper presents the proof of correctness of an experimental supercompiler HOSC dealing with higher-order functions. В работе приводится доказательство корректности экспериментального суперкомпилятора HOSC, работающего с функциями высших порядков.
متن کاملThe Supercompiler SCP4: General Structure
The author constructed a transformer Scp4 of functional programs. The transformer uses the technology known as Turchin’s supercompilation. Scp4 was implemented in a functional language Refal-5. The input language for Scp4 is also Refal-5. In the paper we consider the general structure of the supercompiler and give a number of examples of transformations.
متن کامل