skip to main content
10.1145/1863523.1863540acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

Supercompilation by evaluation

Published:30 September 2010Publication History

ABSTRACT

This paper shows how call-by-need supercompilation can be recast to be based explicitly on an evaluator, contrasting with standard presentations which are specified as algorithms that mix evaluation rules with reductions that are unique to supercompilation. Building on standard operational-semantics technology for call-by-need languages, we show how to extend the supercompilation algorithm to deal with recursive let expressions.

Skip Supplemental Material Section

Supplemental Material

haskell-1620-bolingbroke.mov

mov

121.2 MB

References

  1. }}Valentin F. Turchin. The concept of a supercompiler. ACM Trans. Program. Lang. Syst., 8(3):292--325, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. }}Alexei P. Lisitsa and Andrei P. Nemytykh. Verification as specialization of interpreters with respect to data. In Proocedings of First International Workshop on Metacomputation in Russia, pages 94--112, 2008.Google ScholarGoogle Scholar
  3. }}Peter A. Jonsson and Johan Nordlander. Positive supercompilation for a higher order call-by-value language. In POPL '09: Proceedings of the 36th ACM SIGPLAN-SIGACT symposium on Principles of Programming Languages, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. }}Philip Wadler. Deforestation: Transforming programs to eliminate trees. In ESOP '88, volume 300 of Lecture Notes in Computer Science, pages 344--358. Springer Berlin / Heidelberg, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. }}Simon Peyton Jones. Constructor specialisation for Haskell programs. Proceedings of the ACM SIGPLAN International Conference on Functional Programming, ICFP 2007, pages 327--337, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. }}Morten Heine Sørensen, Robert Glück, and Neil D. Jones. Towards unifying partial evaluation, deforestation, supercompilation, and gpc. In ESOP '94: Proceedings of the 5th European Symposium on Programming, pages 485--500, London, UK, 1994. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. }}Neil Mitchell. Rethinking supercompilation. In Proceedings of the ACM SIGPLAN International Conference on Functional Programming, ICFP 2010. ACM, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. }}Ilya Klyuchnikov. Supercompiler HOSC 1.0: under the hood. Preprint 63, Keldysh Institute of Applied Mathematics, Moscow, 2009.Google ScholarGoogle Scholar
  9. }}Cormac Flanagan, Amr Sabry, Bruce F. Duba, and Matthias Felleisen. The essence of compiling with continuations. ACM SIGPLAN Notices, 28(6):237--247, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. }}Peter Sestoft. Deriving a lazy abstract machine. Journal of Functional Programming, 7(03):231--264, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. }}G. Higman. Ordering by divisibility in abstract algebras. Proceedings of the London Mathematical Society, 3(1):326, 1952.Google ScholarGoogle ScholarCross RefCross Ref
  12. }}Michael Leuschel. On the power of homeomorphic embedding for online termination. In Static Analysis, volume 1503 of Lecture Notes in Computer Science, pages 230--245. Springer Berlin / Heidelberg, 1998.Google ScholarGoogle ScholarCross RefCross Ref
  13. }}Neil Mitchell and Colin Runciman. Uniform boilerplate and list processing. In Proceedings of the ACM SIGPLAN Workshop on Haskell, page 60. ACM, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. }}Morten Heine Sørensen and Robert Glück. Introduction to supercompilation. In Partial Evaluation, volume 1706 of Lecture Notes in Computer Science, pages 246--270. Springer Berlin / Heidelberg, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. }}Simon Peyton Jones, Cordy Hall, Kevin Hammond, Jones Cordy, Kevin Hall, Will Partain, and Phil Wadler. The Glasgow Haskell compiler: a technical overview, 1992.Google ScholarGoogle Scholar
  16. }}Jan Kort. Deforestation of a raytracer. Master's thesis, Department of Computer Science, University of Amsterdam, The Netherlands, 1996.Google ScholarGoogle Scholar
  17. }}Duncan Coutts, Roman Leshchinskiy, and Donald Stewart. Stream fusion: From lists to streams to nothing at all. In Proceedings of the ACM SIGPLAN International Conference on Functional Programming, ICFP 2007, April 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. }}Will Partain. The nofib benchmark suite of Haskell programs. In Proceedings of the 1992 Glasgow Workshop on Functional Programming, pages 195--202, London, UK, 1993. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. }}Simon Peyton Jones and John Launchbury. Unboxed values as first class citizens in a non-strict functional language. In Functional Programming Languages and Computer Architecture, pages 636--666. Springer, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. }}Neil D. Jones, Carsten K. Gomard, and Peter Sestoft. Partial evaluation and automatic program generation. Prentice-Hall International Series In Computer Science, page 415, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. }}Peter Sestoft. The structure of a self-applicable partial evaluator. In Programs as Data Objects, volume 217 of Lecture Notes in Computer Science, pages 236--256. Springer Berlin / Heidelberg, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. }}Valentin F. Turchin. The algorithm of generalization in the supercompile. Dines Bjørner, Andrei P. Ershov, and Neil D. Jones, editors, Partial Evaluation and Mixed Computation, pages 531--549.Google ScholarGoogle Scholar
  23. }}Neil Mitchell and Colin Runciman. A supercompiler for core Haskell. In Implementation and Application of Functional Languages, volume 5083 of Lecture Notes in Computer Science, pages 147--164. Springer Berlin / Heidelberg, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. }}Jesper Jørgensen. Generating a compiler for a lazy language by partial evaluation. In POPL '92: Proceedings of the 19th ACM SIGPLAN-SIGACT symposium on Principles of Programming Languages, pages 258--268, New York, NY, USA, 1992. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. }}Martin Sulzmann, Manuel Chakravarty, Simon Peyton Jones, and Kevin Donnelly. System F with type equality coercions. In ACM SIGPLAN International Workshop on Types in Language Design and Implementation (TLDI'07). ACM, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Supercompilation by evaluation

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in
          • Published in

            cover image ACM Conferences
            Haskell '10: Proceedings of the third ACM Haskell symposium on Haskell
            September 2010
            166 pages
            ISBN:9781450302524
            DOI:10.1145/1863523
            • cover image ACM SIGPLAN Notices
              ACM SIGPLAN Notices  Volume 45, Issue 11
              HASKELL '10
              November 2010
              156 pages
              ISSN:0362-1340
              EISSN:1558-1160
              DOI:10.1145/2088456
              Issue’s Table of Contents

            Copyright © 2010 ACM

            Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 30 September 2010

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article

            Acceptance Rates

            Overall Acceptance Rate57of143submissions,40%

            Upcoming Conference

            ICFP '24

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader