Supercompiler Scp4: Use of quasi-distributive laws in program transformation

  • Andrei P. Nemytykh
Program Analysis and Transformation


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 present paper we give an outline of the supercompilar and consider a number of tools of the transformer in details. The tools can be formally thought of as quasi-distributive laws.

Key words

program transformation supercompilation specialization retyping arity raiser 

CLC number



Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [1]
    Turchin V F. The Language Refal, the Theory of Compilation and Metasystem Analysis. Courant Computer Science Report #20, New York University, 1980.Google Scholar
  2. [2]
    Turchin V F. The concept of a supercompiler, ACM Transactions on Programming Languages and Systems, 1986,8: 292–325.MATHCrossRefGoogle Scholar
  3. [3]
    Turchin V F.The Algorithm of Generalization in the Supercompiler. Proceedings of the IFIP TC2 Workshop, Partial Evaluation and Mixed Computation. Amsterdam: North-Holland Publishing Co., 1988, 531.Google Scholar
  4. [4]
    Turchin V F. Program Transformation with Metasystem Transitions.J of Functional Programming, 1993,3(3): 283–313.CrossRefGoogle Scholar
  5. [5]
    Korlyukov A V. User Manual on the Supercompiler Scp4. (in Russian) http://www.refal. net/supercom.htm, 1999.Google Scholar
  6. [6]
    Nemytykh A P, Turchin V F. The Supercompiler Scp4: Sources, on-line Demonstration. http://, 2000.Google Scholar
  7. [7]
    Turchin V F, Turchin D V, Konyshev A P,et al. Refal-5: sources, executable modules. http://www. botik. ru/pub/local/scp/refal5/2000.Google Scholar
  8. [8]
    Romaneko S A. Arity Raiser and Its Use in Program Specialization.Proceeding of the ESOP’90, LNCS, Vol 432. Springer-Verlag, 1990. 341–360.Google Scholar
  9. [9]
    Turchin V F, Refal-5, Programming Guide & Reference Manual. New England Publishing Co., 1989 (electronic version:,2000.)Google Scholar

Copyright information

© Springer 2001

Authors and Affiliations

  • Andrei P. Nemytykh
    • 1
  1. 1.Program Systems Institute RAS Pereslavl-ZalesskyYaroslavl RegionRussia

Personalised recommendations