Abstract
This paper (essentially [12, Chapter 8]) describes partial evaluation for the lambda calculus, augmented with an explicit fixed-point operator. The techniques used here diverge from those used in [12, Chapters 4, 5] and [11] in that they are not based on specialization of named program points. The algorithm essentially leaves some operators (applications, lambdas, etc.) untouched and reduces others as standard evaluation would do it. This simple scheme is able to handle programs that rely heavily on higher-order facilities. The requirements on binding-time analysis are formulated via a type system and an efficient binding-time analysis via constraint solving is outlined. The partial evaluator is proven correct.
Chapter 8 from Partial Evaluation and Automatic Program Generation, Prentice-Hall International, 1993, ISBN 0-13-020249-5 (pbk). Reprinted with permission from Pentice-Hall International. All references to “book” in this article refers to this book.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Anders Bondorf and Dirk Dussart. Improving cps-based partial evaluation: Writing cogen by hand. In ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation, volume 94/9 of Technical Report, pages 1–9. University of Melbourne, Australia, 1994.
Olivier Danvy. Pragmatics of type-directed partial evaluation. In Olivier Danvy, Robert Glück, and Peter Thiemann, editors, Partial Evaluation, volume 1110 of Lecture Notes in Computer Science, pages 73–94. Springer-Verlag, 1996.
Olivier Danvy, Karoline Malmkjær, and Jens Palsberg. The essence of etaexpansion in partial evaluation. Lisp and Symbolic Computation, 8(3):209–227, 1995.
C.K. Gomard. Partial type inference for untyped functional programs. In 1990 ACM Conference on Lisp and Functional Programming, Nice, France, pages 282–287. ACM, 1990.
C.K. Gomard and N.D. Jones. A partial evaluator for the untyped lambda-calculus. Journal of Functional Programming, 1(1):21–69, January 1991.
John Hatcliff. Mechanically verifying the correctness of an offline partial evaluator. In Manuel Hermenegildo and S. Doaitse Swierstra, editors, Proceedings of the Seventh International Symposium on Programming Languages, Implementations, Logics and Programs, number 982 in Lecture Notes in Computer Science, pages 279–298, Utrecht, The Netherlands, September 1995.
John Hatcliff. Foundations of partial evaluation of functional programs with computational effects. ACM Computing Surveys, 1998. (in press).
John Hatcliff and Olivier Danvy. A computational formalization for partial evaluation. Mathematical Structures in Computer Science, 7:507–541, 1997. Special issue devoted to selected papers from the Workshop on Logic, Domains, and Programming Languages. Darmstadt, Germany. May, 1995.
Fritz Henglein. Efficient type inference for higher-order binding-time analysis. In J. Hughes, editor, FPCA, pages 448–472. 5th ACM Conference, Cambridge, MA, USA, Berlin: Springer-Verlag, August 1991. Lecture Notes in Computer Science, Vol. 523.
John Hughes. Type specialisation for the λ-calculus; or a new paradigm for partial evaluation based on type inference. In Olivier Danvy, Robert Glück, and Peter Thiemann, editors, Partial Evaluation, volume 1110 of Lecture Notes in Computer Science, pages 183–215. Springer-Verlag, 1996.
J. Hatcliff. An introduction to partial evaluation using a simple flowchart language. This volume, 1998.
N.D. Jones, C. Gomard, P. Sestoft. Partial Evaluation and Automatic Program Generation. Prentice Hall, 1993.
Julia L. Lawall and Olivier Danvy. Continuation-based partial evaluation. LFP, pages 227–238, 1994.
Julia L. Lawall and Peter Thiemann. Sound specialization in the presence of computational effects. In Proceedings of Theoretical Aspects of Computer Software, Lecture Notes in Computer Science, September 1997. (to appear).
R. Milner. A theory of type polymorphism in programming. Journal of Computer and System Sciences, 17:348–375, 1978.
R. Milner, M. Tofte, and R. Harper. The Definition of Standard ML. Cambridge, MA: MIT Press, 1990.
T. Mogensen. Self-applicable partial evaluation for pure lambda calculus. In Partial Evaluation and Semantics-Based Program Manipulation, San Francisco, California, June 1992. (Technical Report YALEU/DCS/RR-909, Yale University), pages 116–121, 1992.
T. Æ. Mogensen. Self-applicable online partial evaluation of the pure lambda calculus. In William L. Scherlis, editor, Proceedings of PEPM’ 95, pages 39–44. ACM, ACM Press, 1995.
Eugenio Moggi. Computational lambda-calculus and monads. In Proceedings of the Fourth Annual IEEE Symposium on Logic in Computer Science, pages 14–23, Pacific Grove, California, June 1989. IEEE Computer Society Press.
Eugenio Moggi. Notions of computation and monads. Information and Computation, 93:55–92, 1991.
Eugenio Moggi. A categorical account of two-level languages. In Mathematical Foundations of Programming Semantics, Technical Report, pages 199–212. Electronic Notes in Theoretical Computer Science, 1997.
H.R. Nielson and F. Nielson. Automatic binding time analysis for a typed λ-calculus. Science of Computer Programming, 10:139–176, 1988.
H.R. Nielson and F. Nielson. Two-Level Functional Languages. Cambridge University Press, 1992. Cambridge Tracts in Theoretical Computer Science vol. 34.
Jens Palsberg. Correctness of binding-time analysis. Journal of Functional Programming, 3(3):347–363, 1993.
Frank Pfenning. Logic programming in the LF logical framework. In Gérard Huet and Gordon Plotkin, editors, Logical Frameworks, pages 149–181. Cambridge University Press, 1991.
M. Wand. Specifying the correctness of binding-time analysis. In Twentieth ACM Symposium on Principles on Programming Languages, Charleston, South Carolina, pages 137–143. New York: ACM, 1993.
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
Jones, N.D., Gomard, C.K., Sestoft, P. (1999). Partial Evaluation for the Lambda Calculus. 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_7
Download citation
DOI: https://doi.org/10.1007/3-540-47018-2_7
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-66710-0
Online ISBN: 978-3-540-47018-2
eBook Packages: Springer Book Archive