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.
Supplemental Material
- }}Valentin F. Turchin. The concept of a supercompiler. ACM Trans. Program. Lang. Syst., 8(3):292--325, 1986. Google ScholarDigital Library
- }}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 Scholar
- }}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 ScholarDigital Library
- }}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 ScholarDigital Library
- }}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 ScholarDigital Library
- }}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 ScholarDigital Library
- }}Neil Mitchell. Rethinking supercompilation. In Proceedings of the ACM SIGPLAN International Conference on Functional Programming, ICFP 2010. ACM, 2010. Google ScholarDigital Library
- }}Ilya Klyuchnikov. Supercompiler HOSC 1.0: under the hood. Preprint 63, Keldysh Institute of Applied Mathematics, Moscow, 2009.Google Scholar
- }}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 ScholarDigital Library
- }}Peter Sestoft. Deriving a lazy abstract machine. Journal of Functional Programming, 7(03):231--264, 1997. Google ScholarDigital Library
- }}G. Higman. Ordering by divisibility in abstract algebras. Proceedings of the London Mathematical Society, 3(1):326, 1952.Google ScholarCross Ref
- }}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 ScholarCross Ref
- }}Neil Mitchell and Colin Runciman. Uniform boilerplate and list processing. In Proceedings of the ACM SIGPLAN Workshop on Haskell, page 60. ACM, 2007. Google ScholarDigital Library
- }}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 ScholarDigital Library
- }}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 Scholar
- }}Jan Kort. Deforestation of a raytracer. Master's thesis, Department of Computer Science, University of Amsterdam, The Netherlands, 1996.Google Scholar
- }}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 ScholarDigital Library
- }}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 ScholarDigital Library
- }}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 ScholarDigital Library
- }}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 ScholarDigital Library
- }}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 ScholarDigital Library
- }}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 Scholar
- }}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 ScholarDigital Library
- }}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 ScholarDigital Library
- }}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 ScholarDigital Library
Index Terms
- Supercompilation by evaluation
Recommendations
Rethinking supercompilation
ICFP '10Supercompilation is a program optimisation technique that is particularly effective at eliminating unnecessary overheads. We have designed a new supercompiler, making many novel choices, including different termination criteria and handling of let ...
Rethinking supercompilation
ICFP '10: Proceedings of the 15th ACM SIGPLAN international conference on Functional programmingSupercompilation is a program optimisation technique that is particularly effective at eliminating unnecessary overheads. We have designed a new supercompiler, making many novel choices, including different termination criteria and handling of let ...
Supercompilation by evaluation
HASKELL '10This 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 ...
Comments