Abstract
PGG is an offline partial evaluation system for the full Scheme language, conforming to the current R5RS standard [12]. This exposition concentrates on two aspects of the system:
-
specialization of higher-order primitives;
-
specialization of operations that involve state.
The machinery for higher-order primitives enables the specialization of operations like eval, call-with-current-continuation, etc; specialization with state overcomes one of the major restrictions of traditional offline partial evaluators for functional languages. Both aspects require significant additions to the standard binding-time analysis for the lambda calculus, as well as to the specialization algorithm itself. We present an informal outline of the principles underlying the respective analyses and their associated specializers including motivating examples (parser generation and programming with message passing).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Harold Abelson, Gerald Jay Sussman, and Julie Sussman. Structure and Interpretation of Computer Programs. MIT Press, Cambridge, Mass., second edition, 1996.
Anders Bondorf. Automatic autoprojection of higher order recursive equations. Science of Computer 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. Similix 5.0 Manual. DIKU, University of Copenhagen, May 1993.
Anders Bondorf and Olivier Danvy. Automatic autoprojection of recursive equations with global variables and abstract data types. Science of Computer Programming, 16(2):151–195, 1991.
Robert Cartwright and Mike Fagan. Soft typing. In Proc. Conference on Programming Language Design and Implementation’ 91, pages 278-, Toronto, June 1991. ACM.
Dirk Dussart, Fritz Henglein, and Christian Mossin. Polymorphic recursion and subtype qualifications: Polymorphic binding-time analysis in polynomial time. In Alan Mycroft, editor, Proc. International Static Analysis Symposium, SAS’95, volume 983 of Lecture Notes in Computer Science, pages 118–136, Glasgow, Scotland, September 1995. Springer-Verlag.
Carsten K. Gomard. Partial type inference for untyped functional programs. In Proc. 1990 ACM Conference on Lisp and Functional Programming, pages 282–287, Nice, France, 1990. ACM Press.
Fritz Henglein. Dynamic typing: Syntax and proof theory. Science of Computer Programming, 22:197–230, 1994.
Neil D. Jones, Carsten K. Gomard, and Peter Sestoft. Partial Evaluation and Automatic Program Generation. Prentice-Hall, 1993.
Pierre Jouvelot and David K. Gifford. Algebraic reconstruction of types and effects. In Proc. 18th Annual ACM Symposium on Principles of Programming Languages, pages 303–310, Orlando, Florida, January 1991. ACM Press.
Richard Kelsey, William Clinger, and Jonathan Rees. Revised report on the algorithmic language scheme. Technical report, 1998.
Julia L. 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 L. 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.
John M. Lucassen and David K. Gifford. Polymorphic effect systems. In Proc. 15th Annual ACM Symposium on Principles of Programming Languages, pages 47–57, San Diego, California, January 1988. ACM Press.
Eugenio Moggi. Functor categories and two-level languages. In M. Nivat and A. Arnold, editors, Foundations of Software Science and Computation Structures, FoSSaCS’98, Lecture Notes in Computer Science, Lisbon, Portugal, April 1998.
Frank Pfenning and Conal Elliott. Higher-order abstract syntax. In Proc. Conference on Programming Language Design and Implementation’ 88, pages 199–208, Atlanta, July 1988. ACM.
Jean-Pierre Talpin and Pierre Jouvelot. Polymorphic type, region and effect inference. Journal of Functional Programming, 2(3):245–272, July 1992.
Peter Thiemann. Implementing memoization for partial evaluation. In Herbert Kuchen and Doaitse Swierstra, editors, International Symposium on Programming Languages, Implementations, Logics and Programs (PLILP’ 96), volume 1140 of Lecture Notes in Computer Science, pages 198–212, Aachen, Germany, September 1996. Springer-Verlag.
Peter Thiemann. Towards partial evaluation of full Scheme. In Gregor Kiczales, editor, Reflection’96, pages 95–106, San Francisco, CA, USA, April 1996.
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. In Chris Hankin, editor, Proc. 7th European Symposium on Programming, volume 1381 of Lecture Notes in Computer Science, pages 267–281, Lissabon, Portugal, April 1998. Springer-Verlag.
Peter Thiemann. The PGG System—User Manual. University of Nottingham, Nottingham, England, June 1998. Available from ftp://ftp.informatik.uni-tuebingen.de/pub/PU/thiemann/software/pgg/.
Peter Thiemann and Dirk Dussart. Partial evaluation for higher-order languages with state. Berichte des Wilhelm-Schickard-Instituts WSI-97-XX, Universität Tübingen, April 1997.
Mads Tofte and Jean-Pierre Talpin. Implementation of the typed call-by-value λ-calculus using a stack of regions. In Proc. 21st Annual ACM Symposium on Principles of Programming Languages, pages 188–201, Portland, OG, January 1994. ACM Press.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1999 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Thiemann, P. (1999). Aspects of the PGG System: Specialization for Standard Scheme. In: Hatcliff, J., Mogensen, T.Æ., Thiemann, P. (eds) Partial Evaluation. DIKU 1998. Lecture Notes in Computer Science, vol 1706. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-47018-2_17
Download citation
DOI: https://doi.org/10.1007/3-540-47018-2_17
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-66710-0
Online ISBN: 978-3-540-47018-2
eBook Packages: Springer Book Archive