Abstract
We show how testing convertibility of two types in dependently typed systems can advantageously be implemented instead untyped normalization by evaluation, thereby reusing existing compilers and runtime environments for stock functional languages, without peeking under the hood, for a fast yet cheap system in terms of implementation effort.
Our focus is on performance of untyped normalization by evaluation. We demonstrate that with the aid of a standard optimization for higher order programs (namely uncurrying), the reuse of native datatypes and pattern matching facilities of the underlying evaluator, we may obtain a normalizer with little to no performance overhead compared to a regular evaluator.
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
Aehlig, K., Haftmann, F., Nipkow, T.: A Compiled Implementation of Normalization by Evaluation. In: Mohamed, O.A., Muñoz, C., Tahar, S. (eds.) TPHOLs 2008. LNCS, vol. 5170, pp. 39–54. Springer, Heidelberg (2008)
Altenkirch, T., Dybjer, P., Hofmann, M., Scott, P.: Normalization by evaluation for typed lambda calculus with coproducts. In: Proceedings of the Sixteenth Annual IEEE Symposium on Logic in Computer Science, pp. 203–210 (2001)
Berger, U., Eberl, M., Schwichtenberg, H.: Normalization by evaluation. Prospects for Hardware Foundations, 117–137 (1998)
Berger, U., Eberl, M., Schwichtenberg, H.: Term rewriting for normalization by evaluation. Information and Computation 183(1), 19–42 (2003)
Blanqui, F., Hardin, T., Weis, P.: On the Implementation of Construction Functions for Non-free Concrete Data Types. In: De Nicola, R. (ed.) ESOP 2007. LNCS, vol. 4421, pp. 95–109. Springer, Heidelberg (2007)
Boespflug, M.: From self-interpreters to normalization by evaluation. In: Informal proceedings of the 2009 Workshop on Normalization by Evaluation, August 2009, pp. 35–38 (2009)
Coquand, T., Dybjer, P.: Intuitionistic model constructions and normalization proofs. Mathematical Structures in Computer Science 7(01), 75–94 (1997)
Cousineau, D., Dowek, G.: Embedding pure type systems in the lambda-Pi-calculus modulo. In: Della Rocca, S.R. (ed.) TLCA 2007. LNCS, vol. 4583, pp. 102–117. Springer, Heidelberg (2007)
Crégut, P.: Strongly reducing variants of the Krivine abstract machine. Higher-Order and Symbolic Computation 20(3), 209–230 (2007)
Danvy, O.: Type-directed partial evaluation. In: POPL 1996, pp. 242–257 (1996)
Filinski, A., Rohde, H.: A denotational account of untyped normalization by evaluation (2004)
Gonthier, G.: The four colour theorem: Engineering of a formal proof. In: Kapur, D. (ed.) ASCM 2007. LNCS (LNAI), vol. 5081, p. 333. Springer, Heidelberg (2008)
Grégoire, B., Leroy, X.: A compiled implementation of strong reduction. In: Proceedings of the seventh ACM SIGPLAN international conference on Functional programming, pp. 235–246 (2002)
Grégoire, B., Mahboubi, A.: Proving equalities in a commutative ring done right in coq. In: Hurd, J., Melham, T. (eds.) TPHOLs 2005. LNCS, vol. 3603, pp. 98–113. Springer, Heidelberg (2005)
Le Fessant, F., Maranget, L.: Optimizing pattern matching. In: Proceedings of the sixth ACM SIGPLAN international conference on Functional programming, pp. 26–37 (2001)
Leroy, X.: The ZINC experiment: an economical implementation of the ML language. Tech. rep., INRIA (1990)
Lévy, J.: Réductions correctes et optimales dans le Lambda-Calcul. Université Paris 7 (1978)
Lindley, S.: Normalisation by evaluation in the compilation of typed functional programming languages (2005)
Marlow, S., Peyton-Jones, S.: Making a fast curry: push/enter vs. eval/apply for higher-order languages. Journal of Functional Programming 16(4-5), 415–449 (2006)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Boespflug, M. (2010). Conversion by Evaluation. In: Carro, M., Peña, R. (eds) Practical Aspects of Declarative Languages. PADL 2010. Lecture Notes in Computer Science, vol 5937. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-11503-5_7
Download citation
DOI: https://doi.org/10.1007/978-3-642-11503-5_7
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-11502-8
Online ISBN: 978-3-642-11503-5
eBook Packages: Computer ScienceComputer Science (R0)