Abstract
We give an introduction to normalization by evaluation and type-directed partial evaluation. We first present normalization by evaluation for a combinatory version of Gödel System T. Then we show normalization by evaluation for typed lambda calculus with β and η conversion. Finally, we introduce the notion of binding time, and explain the method of type-directed partial evaluation for a small PCF-style functional programming language. We give algorithms for both call-by-name and call-by-value versions of this language.
Part of this work was carried out at BRICS (Basic Research in Computer Science, http://www.brics.dk), funded by the Danish National Research Foundation.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Thorsten Altenkirch, Peter Dybjer, Martin Hofmann, and Philip Scott. Normalization by evaluation for typed lambda calculus with coproducts. In Proceedings of the 16th Annual IEEE Symposium on Logic in Computer Science, pages 303–310, Boston, Massachusetts, June 2001.
Thorsten Altenkirch, Martin Hofmann, and Thomas Streicher. Categorical reconstruction of a reduction free normalization proof. In D. Pitt, D. E. Rydeheard, and P. Johnstone, editors, Category Theory and Computer Science, 6th International Conference, number 953 in Lecture Notes in Computer Science, Cambridge, UK, August 1995.
Thorsten Altenkirch, Martin Hofmann, and Thomas Streicher. Reduction-free normalization for a polymorphic system. In Proceedings of the 11th Annual IEEE Symposium on Logic in Computer Science, pages 98–106, New Brunswick, New Jersey, July 1996.
Kenichi Asai. Binding-time analysis for both static and dynamic expressions. New Generation Computing, 20(1):27–51, 2002. Preliminary version available in the proceedings of SAS 1999 (LNCS 1694).
Lennart Augustsson. Cayenne-a language with dependent types. In ACM SIGPLAN International Conference on Functional Programming, pages 239–250, Baltimore, Maryland, September 1998.
Henk Barendregt. The type free lambda calculus. In Handbook of Mathematical Logic, pages 1092–1132. North-Holland, 1977.
Henk Barendregt. Functional programming and lambda calculus. In Handbook of Theoretical Computer Science, pages 323–363. Elsevier, 1990.
Henk P. Barendregt. Lambda calculi with types. In Handbook of Logic in Computer Science, volume 2, pages 117–309. Oxford University Press, 1992.
Ulrich Berger. Program extraction from normalization proofs. In M. Bezem and J. F. Groote, editors, Typed Lambda Calculi and Applications, number 664 in Lecture Notes in Computer Science, pages 91–106, Utrecht, The Netherlands, March 1993.
Ulrich Berger and Helmut Schwichtenberg. An inverse of the evaluation functional for typed λ-calculus. In Proceedings of the Sixth Annual IEEE Symposium on Logic in Computer Science, pages 203–211, Amsterdam, The Netherlands, July 1991.
Charles Consel and Olivier Danvy. Tutorial notes on partial evaluation. In Proceedings of the Twentieth Annual ACM Symposium on Principles of Programming Languages, pages 493–501, 1993.
Thierry Coquand and Peter Dybjer. Intuitionistic model constructions and normalization proofs. In H. Barendregt and T. Nipkow, editors, Types for Proofs and Programs, International Workshop TYPES’93, number 806 in Lecture Notes in Computer Science, Nijmegen, The Netherlands, May 1993.
Thierry Coquand and Peter Dybjer. Intuitionistic model constructions and normalization proofs. Mathematical Structures in Computer Science, 7:75–94, 1997.
Djordje Čubrić, Peter Dybjer, and Philip Scott. Normalization and the Yoneda embedding. Mathematical Structures in Computer Science, 8:153–192, 1998.
Olivier Danvy. Pragmatics of type-directed partial evaluation. In O. Danvy, R. Glück, and P. Thiemann, editors, Partial Evaluation, number 1110 in Lecture Notes in Computer Science, pages 73–94, Dagstuhl, Germany, February 1996. Springer-Verlag. Extended version available as the technical report BRICS RS-96-15.
Olivier Danvy. Type-directed partial evaluation. In J. Hatcliff, T. Æ. Mogensen, and P. Thieman, editors, Partial Evaluation-Practice and Theory; Proceedings of the 1998 DIKU Summer School, number 1706 in Lecture Notes in Computer Science, pages 367–411. Springer-Verlag, Copenhagen, Denmark, July 1998.
Olivier Danvy and Peter Dybjer, editors. Proceedings of the 1998 APPSEM Workshop on Normalization by Evaluation, NBE’ 98, (Gothenburg, Sweden, May 8–9, 1998), number NS-98-8 in Note Series, Department of Computer Science, University of Aarhus, May 1998. BRICS.
Olivier Danvy and Andrzej Filinski. Abstracting control. In Proceedings of the 1990 ACM Conference on Lisp and Functional Programming, pages 151–160, Nice, France, June 1990.
Olivier Danvy, Karoline Malmkjær, and Jens Palsberg. The essence of eta-expansion in partial evaluation. Lisp and Symbolic Computation, 8(3):209–227, 1995.
Olivier Danvy and René Vestergaard. Semantics-based compiling: A case study in type-directed partial evaluation. In Eighth International Symposium on Programming Language Implementation and Logic Programming, number 1140 in Lecture Notes in Computer Science, pages 182–197, Aachen, Germany, September 1996.
Andrzej Filinski. Representing layered monads. In Proceedings of the 26th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 175–188, San Antonio, Texas, January 1999.
Andrzej Filinski. A semantic account of type-directed partial evaluation. In G. Nadathur, editor, International Conference on Principles and Practice of Declarative Programming, number 1702 in Lecture Notes in Computer Science, pages 378–395, Paris, France, September 1999.
Andrzej Filinski. Normalization by evaluation for the computational lambda-calculus. In S. Abramsky, editor, Typed Lambda Calculi and Applications, number 2044 in Lecture Notes in Computer Science, pages 151–165, Krakow, Poland, May 2001.
Yoshihiko Futamura. Partial evaluation of computation process-an approach to a compiler-compiler. Systems, Computers, Controls, 2(5):721–728, 1971. Reprinted in Higher-Order and Symbolic Computation, 12(4):381-391, 1999.
Yoshihiko Futamura. Partial evaluation of computation process, revisited. Higher-Order and Symbolic Computation, 12(4):377–380, 1999.
Carsten K. Gomard. A self-applicable partial evaluator for the lambda calculus: Correctness and pragmatics. ACM Transactions on Programming Languages and Systems, 12(4):147–172, April 1991.
Murdoch Gabbay and Andrew Pitts. A new approach to abstract syntax involving binders. In Proceedings of the 14th Annual IEEE Symposium on Logic in Computer Science, pages 214–224, Trento, Italy, July 1999.
Bernd Grobauer and Zhe Yang. The second Futamura projection for type-directed partial evaluation. Higher-Order and Symbolic Computation, 14(2/3):173–219, 2001.
Neil D. Jones, Carsten K. Gomard, and Peter Sestoft. Partial Evaluation and Automatic Program Generation. Prentice Hall International Series in Computer Science. Prentice-Hall, 1993. Available electronically at http://www.dina.dk/~sestoft/pebook/.
Yves Lafont. Logiques, Catégories et Machines. PhD thesis, Université de Paris VII, Paris, France, January 1988.
John C. Mitchell. Foundations for Programming Languages. The MIT Press, 1996.
Per Martin-Löf. About models for intuitionistic type theories and the notion of definitional equality. In S. Kanger, editor, Proceedings of the 3rd Scandinavian Logic Symposium, pages 81–109, 1975.
Per Martin-Löf. An intuitionistic theory of types: Predicative part. In H. E. Rose and J. C. Shepherdson, editors, Logic Colloquium’ 73, pages 73–118. North-Holland, 1975.
Lena Magnusson and Bengt Nordström. The ALF proof editor and its proof engine. In H. Barendregt and T. Nipkow, editors, Types for Proofs and Programs, International Workshop TYPES’93, number 806 in Lecture Notes in Computer Science, pages 213–237, Nijmegen, The Netherlands, May 1993.
Eugenio Moggi. Computational lambda-calculus and monads. In Proceedings of the Fourth Annual Symposium on Logic in Computer Science, pages 14–23, Pacific Grove, California, June 1989. IEEE.
Torben Æ. Mogensen. Efficient self-interpretation in lambda calculus. Journal of Functional Programming, 2(3):345–364, July 1992.
Flemming Nielson and Hanne Riis Nielson. Two-level semantics and code generation. Theoretical Computer Science, 56(1):59–133, January 1988.
Atsushi Ohori. A Curry-Howard isomorphism for compilation and program execution. In J.-Y. Girard, editor, Typed Lambda Calculi and Applications, number 1581 in Lecture Notes in Computer Science, pages 280–294, L’Aquila, Italy, April 1999.
Lawrence C. Paulson. Foundations of functional programming. Notes from a course given at the Computer Laboratory of Cambridge University, available from http://www.cl.cam.ac.uk/users/lcp/papers/#Courses, 2000.
Gordon D. Plotkin. Call-by-name, call-by-value and the λ-calculus. Theoretical Computer Science, 1(2):125–159, December 1975.
Gordon D. Plotkin. LCF considered as a programming language. Theoretical Computer Science, 5(3):223–255, December 1977.
John C. Reynolds. Definitional interpreters for higher-order programming languages. In Proceedings of 25th ACM National Conference, pages 717–740, Boston, Massachusetts, August 1972. Reprinted in Higher-Order and Symbolic Computation, 11(4):363–397, 1998.
Erik Ruf. Topics in Online Partial Evaluation. PhD thesis, Stanford University, Stanford, California, February 1993. Technical report CSL-TR-93-563.
Eijiro Sumii and Naoki Kobayashi. A hybrid approach to online and offline partial evaluation. Higher-Order and Symbolic Computation, 14(2/3):101–142, 2001.
Christopher Strachey and Christopher P. Wadsworth. Continuations: A mathematical semantics for handling full jumps. Technical Monograph PRG-11, Oxford University Computing Laboratory, Programming Research Group, Oxford, England, 1974. Reprinted in Higher-Order and Symbolic Computation, 13(1/2):135–152, April 2000.
Glynn Winskel. The Formal Semantics of Programming Languages: An Introduction. The MIT Press, 1993.
Zhe Yang. Encoding types in ML-like languages. In ACM SIGPLAN International Conference on Functional Programming, pages 289–300, Baltimore, Maryland, September 1998. Extended version to appear in TCS.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2002 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Dybjer, P., Filinski, A. (2002). Normalization and Partial Evaluation. In: Barthe, G., Dybjer, P., Pinto, L., Saraiva, J. (eds) Applied Semantics. APPSEM 2000. Lecture Notes in Computer Science, vol 2395. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45699-6_4
Download citation
DOI: https://doi.org/10.1007/3-540-45699-6_4
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-44044-4
Online ISBN: 978-3-540-45699-5
eBook Packages: Springer Book Archive