Squeezing intermediate construction in equational programs

  • Alain Miniussi
  • David J. Sherman
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1110)


In this paper we give a general introduction to the particular problems associated with partial evaluation of intermediate code for equational programs, and propose some criteria for deciding whether an unfolding strategy is good enough from a practical standpoint. We then present a new algorithm for driving unfolding of EM code programs, and show that, in addition to terminating, it produces a good result. As we have already implemented the new strategy, this final point is demonstrated with a number of concrete examples.


intermediate code program transformation equational programming executable specifications 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [BD77]
    R. M. Burstall and John Darlington. A transformation system for developing recursive programs. Journal of the ACM, 24(1), 1977.Google Scholar
  2. [Chi94]
    Wei-Ngan Chin. Safe fusion of functional expressions II: Further improvements. Journal of Functional Programming, 4(4):515–555, 1994.Google Scholar
  3. [Con88]
    Charles Consel. New insights into partial evaluation: the Schism experiment. In ESOP'88, Second European Symposium on Programming, volume LLNCS 300. Springer-Verlag, 1988.Google Scholar
  4. [Con92]
    Charles Consel. Report on Schism '92. Technical Report, Pacific Software Research Center, Oregon Graduate Institute of Science and Technology, 1992.Google Scholar
  5. [GK93]
    Robert Glück and Andrei Klimov. Occam's razor in metacomputation: the notion of a perfect process tree. In Static Analysis, LNCS 724, Padova, Italy, September 1993. Springer-Verlag.Google Scholar
  6. [HJ94]
    Fritz Henglein and Jesper Jorgensen. Formally optimal boxing. In Principles of Programming Languages, Portland, Oregon, January 1994. ACM Press.Google Scholar
  7. [HL79]
    Gèrard Huet and Jean-Jacques Lévy. Computations in non-ambiguous linear term rewriting systems. Technical Report 359, INRIA, 1979.Google Scholar
  8. [HL91a]
    Gérard Huet and Jean-Jacques Lévy. Computations in orthogonal rewriting systems, I. In Computational Logic: Essays in Honor of Alan Robinson, chapter 11, pages 395–414. The MIT Press, 1991.Google Scholar
  9. [HL91b]
    Gérard Huet and Jean-Jacques Lévy. Computations in orthogonal rewriting systems, II. In Computational Logic: Essays in Honor of Alan Robinson, chapter 12, pages 415–443. The MIT Press, 1991.Google Scholar
  10. [JL91]
    Simon Peyton Jones and John Launchbury. Unboxed values as first-class citizens. In Proceedings of Conference on FUnctional Programming Languages and Computer Architecture (FPCA), volume LNCS 523. Springer-Verlag, August 1991.Google Scholar
  11. [Ler92]
    Xavier Leroy. Unboxed objects and polymorphic typing. In Proceedings of the 19th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). ACM Press, January 1992.Google Scholar
  12. [MMSS94]
    Timo Metzemakers, Alain Miniussi, David J. Sherman, and Robert I. Strandh. Improving arithmetic performance using fine-grain unfolding. In Manuel Hermenegildo and Jaan Penjam, editors, International Conference on Programming Language Implementation and Logic Programming (LNCS 844), pages 324–339. Springer-Verlag, September 1994.Google Scholar
  13. [O'D85]
    Michael J. O'Donnell. Equational Logic as a Programming Language. MIT Press, 1985.Google Scholar
  14. [O'D87]
    Michael J. O'Donnell. Survey of the equational logic programming project. In Colloquium on Resolution of Equations in Algebraic Structures, 1987.Google Scholar
  15. [Pal95]
    Jens Palsberg. Comparing flow-based binding-time analyses. In International Joint Conference on the Theory and Practice of Software Development (TAPSOFT), volume LLNCS 915. Springer-Verlag, 1995.Google Scholar
  16. [Pou93]
    Eigil Poulsen. Representation analysis for efficient implementation of polymorphism. Master's Thesis, DIKU, University of Copenhagen, 1993.Google Scholar
  17. [Reb93]
    Samuel Alexander Rebelsky. Tours, A System for Lazy Term-based Communication. PhD thesis, University of Chicago, Chicago, Illinois, 1993.Google Scholar
  18. [San95]
    David Sands. Proving the correctness of recursion-based automatic program transformations. In Proceedings of TAPSOFT '95, the Sixth International Joint Conference on the Theory and Practice of Software Development, 1995.Google Scholar
  19. [SGJ94]
    Morten Heine Sørensen, Robert Glück, and Neil Jones. Towards unifying partial evaluation, deforestation, supercompilation, and gpc. In Proceedings of the European Symposium on Programming, ESOP'94, January 1994.Google Scholar
  20. [She94a]
    David J. Sherman. EM code semantics, analysis, and optimization. Technical Report 827-94, LaBRI, Université Bordeaux-1, 1994. (Revised August 1993).Google Scholar
  21. [She94b]
    David J. Sherman. Run-time and Compile-time Improvements to Equational Programs. PhD thesis, University of Chicago, Chicago, Illinois, 1994.Google Scholar
  22. [Sør94]
    Morten Heine Sørensen. A grammar-based data-flow analysis to stop deforestation. In Proceedings of CAAP'94, Colloquium on Trees in Algebra and Programming. Springer-Verlag, 1994.Google Scholar
  23. [SS92]
    David J. Sherman and Robert I. Strandh. Call unfolding strategies for equational logic programs. In Proceedings of the ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation, San Francisco, California, 1992.Google Scholar
  24. [Str87]
    Robert I. Strandh. Optimizing equational programs. In Proceedings of the Second International Conference on Rewrite Techniques and Applications, 1987.Google Scholar
  25. [Str88]
    Robert I. Strandh. Compiling Equational Programs into Efficient Machine Code. PhD thesis, Johns Hopkins University, Baltimore, Maryland, 1988.Google Scholar
  26. [Tur86]
    Valentin Turchin. The concept of a supercompiler. ACM Transactions on Programming Languages, 8(3):292–325, 1986.Google Scholar
  27. [Wad88]
    Philip Wadler. Deforestation: Transforming programs to eliminate trees. In Second European Symposium on Programming. Springer-Verlag, 1988.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1996

Authors and Affiliations

  • Alain Miniussi
    • 1
  • David J. Sherman
    • 1
  1. 1.Laboratoire Bordelais de Recherche en InformatiqueUniversité Bordeaux-1Talence CedexFrance

Personalised recommendations