Abstract
We present a generic framework for specifying and implementing offline partial evaluators. The framework provides the infrastructure for specializing higher-order programs with computational effects specified through a monad. It performs sound specialization for all monadic instances and is evaluation-order independent. It subsumes most previously published partial evaluators for higher-order functional programming languages in the sense that they are instances of the generic framework with respect to a particular monad.
Chapter PDF
References
Lars Ole Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen, May 1994. (DIKU report 94/19).
Lars Birkedal and Morten Welinder. Partial evaluation of Standard ML. Rapport 93/22, DIKU, University of Copenhagen, 1993.
Anders Bondorf. Automatic autoprojection of higher order recursive equations. Science of Programming, 17:3–34, 1991.
Anders Bondorf. Improving binding times without explicit CPS-conversion. In Proc. 1992 ACM Conference on Lisp and Functional Programming, pages 1–10, San Francisco, California, USA, June 1992.
Anders Bondorf and Olivier Danvy. Automatic autoprojection of recursive equations with global variables and abstract data types. Science of Programming, 16(2):151–195, 1991.
Anders Bondorf and Jesper JØrgensen. Efficient analysis for realistic off-line partial evaluation. Journal of Functional Programming, 3(3):315–346, July 1993.
Mikhail A. Bulyonkov and Dmitrij V. Kochetov. Practical aspects of specialization of Algol-like programs. In Danvy et al. [15]., pages 17–32.
Charles Consel. Polyvariant binding-time analysis for applicative languages. In David Schmidt, editor, Proc. ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation PEPM'93, pages 66–77, Copenhagen, Denmark, June 1993. ACM Press.
Charles Consel and Olivier Danvy. For a better support of static data flow. In John Hughes, editor, Proc. Functional Programming Languages and Computer Architecture 1991, volume 523 of Lecture Notes in Computer Science, pages 496–519, Cambridge, MA, 1991. Springer-Verlag.
Charles Consel and Olivier Danvy. Tutorial notes on partial evaluation. In POPL1993 [33], pages 493–501.
Charles Consel, Luke Hornof, FranÇois NoËl, Jacques Noyé, and Nicolae Volanschi. A uniform approach for compile-time and run-time specialization. In Danvy et al. [15], pages 54–72.
Charles Consel and Francois NoËl. A general approach for run-time specialization and its application to C. In Proc. 23rd Annual ACM Symposium on Principles of Programming Languages, pages 145–156, St. Petersburg, Fla., January 1996. ACM Press.
Olivier Danvy. Back to direct style. Science of Programming, 22:183–195, 1994.
Olivier Danvy and Andrzej Filinski. Abstracting control. In LFP 1990 [27], pages 151–160.
Olivier Danvy, Robert Glück, and Peter Thiemann, editors. Dagstuhl Seminar on Partial Evaluation 1996, volume 1110 of Lecture Notes in Computer Science, Schloß Dagstuhl, Germany, February 1996. Springer-Verlag.
Dirk Dussart, John Hughes, and Peter Thiemann. Type specialisation for imperative languages. In Mads Tofte, editor, Proc. International Conference on Functional Programming 1997, pages 204–216, Amsterdam, The Netherlands, June 1997. ACM Press, New York.
Dirk Dussart and Peter Thiemann. Partial evaluation for higher-order languages with state. Berichte des Wilhelm-Schickard-Instituts WSI-97-XX, Universität Tübingen, April 1997.
David Espinosa. Building interpreters by transforming stratified monads. ftp://altdorf.ai.mit.edu/pub/dae, June 1994.
Carsten K. Gomard and Neil D. Jones. Compiler generation by partial evaluation: A case study. Structured Programming, 12:123–144, 1991.
John Hatcliff and Olivier Danvy. A generic account of continuation-passing styles. In Proc. 21st Annual ACM Symposium on Principles of Programming Languages, pages 458–471, Portland, OG, January 1994. ACM Press.
John Hatcliff and Olivier Danvy. A computational formalization for partial evaluation. Mathematical Structures in Computer Science, 7(5):507–542, 1997.
G. F. Johnson and Dominic Duggan. Stores and partial continuations as first-class objects in a language and its environment. In Proc. 15th Annual ACM Symposium on Principles of Programming Languages, pages 158–168, San Diego, California, January 1988. ACM Press.
Neil D. Jones, Carsten K. Gomard, and Peter Sestoft. Partial Evaluation and Automatic Program Generation. Prentice-Hall, 1993.
John Launchbury and Simon L. Peyton Jones. Lazy functional state threads. In Proc. of the ACM SIGPLAN'94 Conference on Programming Language Design and Implementation, pages 24–35, Orlando, Fla, USA, June 1994. ACM Press.
Julia Lawall and Olivier Danvy. Continuation-based partial evaluation. In Proc. 1994 ACM Conference on Lisp and Functional Programming, pages 227–238, Orlando, Florida, USA, June 1994. ACM Press.
Julia Lawall and Peter Thiemann. Sound specialization in the presence of computational effects. In Proc. Theoretical Aspects of Computer Software, volume 1281 of Lecture Notes in Computer Science, pages 165–190, Sendai, Japan, September 1997. Springer-Verlag.
Proc. 1990 ACM Conference on Lisp and Functional Programming, Nice, France, 1990. ACM Press.
Sheng Liang, Paul Hudak, and Mark Jones. Monad transformers and modular interpreters. In POPL1995 [34], pages 333–343.
Karoline Malmkjaer, Nevin Heintze, and Olivier Danvy. ML partial evaluation using set-based analysis. In Record of the 1994 ACM SIGPLAN Workshop on ML and its Applications, number 2265 in INRIA Research Report, pages 112–119, Orlando, Florida, June 1994.
Eugenio Moggi. Notions of computations and monads. Information and Computation, 93:55–92, 1991.
Barbara Moura, Charles Consel, and Julia Lawall. Bridging the gap between functional and imperative languages. Publication interne 1027, Irisa, Rennes, France, July 1996.
Simon L. Peyton Jones and Philip L. Wadler. Imperative functional programming. In POPL1993 [33], pages 71–84.
Proc. 20th Annual ACM Symposium on Principles of Programming Languages, Charleston, South Carolina, January 1993. ACM Press.
Proc. 22nd Annual ACM Symposium on Principles of Programming Languages, San Francisco, CA, January 1995. ACM Press.
John Riecke. Delimiting the scope of effects. In Arvind, editor, Proc. Functional Programming Languages and Computer Architecture 1993, pages 146–155, Copenhagen, Denmark, June 1993. ACM Press, New York.
John Riecke and Ramesh Viswanathan. Isolating side effects in sequential languages. In POPL1995 [34], pages 1–12.
Peter Thiemann. Correctness of a region-based binding-time analysis. In Proc. Mathematical Foundations of Programming Semantics, Thirteenth Annual Conference, volume 6 of Electronic Notes in Theoretical Computer Science, page 26, Pittsburgh, PA, March 1997. Carnegie Mellon University, Elsevier Science BV. URL: http://www.elsevier.nl/locate/entcs/volume6.html.
Peter Thiemann. A generic framework for specialization. Berichte des Wilhelm-Schickard-Instituts WSI-97-XXX, Universität Tübingen, October 1997.
Philip L. Wadler. Comprehending monads. In LFP 1990 [27], pages 61–78.
Philip L. Wadler. The essence of functional programming. In Proc. 19th Annual ACM Symposium on Principles of Programming Languages, pages 1–14, Albuquerque, New Mexico, January 1992. ACM Press.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1998 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Thiemann, P. (1998). A generic framework for specialization (abridged version). In: Hankin, C. (eds) Programming Languages and Systems. ESOP 1998. Lecture Notes in Computer Science, vol 1381. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0053576
Download citation
DOI: https://doi.org/10.1007/BFb0053576
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-64302-9
Online ISBN: 978-3-540-69722-0
eBook Packages: Springer Book Archive