DIKU 1998: Partial Evaluation pp 412-432 | Cite as

Aspects of the PGG System: Specialization for Standard Scheme

  • Peter Thiemann
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1706)

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).

Keywords

Partial Evaluation Standard Scheme Functional Programming Typing Rule Lambda Calculus 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Harold Abelson, Gerald Jay Sussman, and Julie Sussman. Structure and Interpretation of Computer Programs. MIT Press, Cambridge, Mass., second edition, 1996.MATHGoogle Scholar
  2. 2.
    Anders Bondorf. Automatic autoprojection of higher order recursive equations. Science of Computer Programming, 17:3–34, 1991.CrossRefMATHGoogle Scholar
  3. 3.
    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.Google Scholar
  4. 4.
    Anders Bondorf. Similix 5.0 Manual. DIKU, University of Copenhagen, May 1993.Google Scholar
  5. 5.
    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.CrossRefMATHGoogle Scholar
  6. 6.
    Robert Cartwright and Mike Fagan. Soft typing. In Proc. Conference on Programming Language Design and Implementation’ 91, pages 278-, Toronto, June 1991. ACM.Google Scholar
  7. 7.
    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.Google Scholar
  8. 8.
    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.Google Scholar
  9. 9.
    Fritz Henglein. Dynamic typing: Syntax and proof theory. Science of Computer Programming, 22:197–230, 1994.MathSciNetCrossRefMATHGoogle Scholar
  10. 10.
    Neil D. Jones, Carsten K. Gomard, and Peter Sestoft. Partial Evaluation and Automatic Program Generation. Prentice-Hall, 1993.Google Scholar
  11. 11.
    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.Google Scholar
  12. 12.
    Richard Kelsey, William Clinger, and Jonathan Rees. Revised report on the algorithmic language scheme. Technical report, 1998.Google Scholar
  13. 13.
    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.Google Scholar
  14. 14.
    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.CrossRefGoogle Scholar
  15. 15.
    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.Google Scholar
  16. 16.
    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.Google Scholar
  17. 17.
    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.Google Scholar
  18. 18.
    Jean-Pierre Talpin and Pierre Jouvelot. Polymorphic type, region and effect inference. Journal of Functional Programming, 2(3):245–272, July 1992.MathSciNetCrossRefMATHGoogle Scholar
  19. 19.
    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.CrossRefGoogle Scholar
  20. 20.
    Peter Thiemann. Towards partial evaluation of full Scheme. In Gregor Kiczales, editor, Reflection’96, pages 95–106, San Francisco, CA, USA, April 1996.Google Scholar
  21. 21.
    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.
  22. 22.
    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.Google Scholar
  23. 23.
    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/.Google Scholar
  24. 24.
    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.Google Scholar
  25. 25.
    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.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1999

Authors and Affiliations

  • Peter Thiemann
    • 1
  1. 1.Institut für InformatikUniversität FreiburgGermany

Personalised recommendations