Hostname: page-component-8448b6f56d-c4f8m Total loading time: 0 Render date: 2024-04-24T06:55:22.976Z Has data issue: false hasContentIssue false

Normal-order reduction grammars*

Published online by Cambridge University Press:  17 January 2017

MACIEJ BENDKOWSKI*
Affiliation:
Theoretical Computer Science Department, Faculty of Mathematics and Computer Science, Jagiellonian University, ul. Prof. Łojasiewicza 6, 30-348 Kraków, Poland (e-mail: maciej.bendkowski@tcs.uj.edu.pl)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

We present an algorithm which, for given n, generates an unambiguous regular tree grammar defining the set of combinatory logic terms, over the set {S, K} of primitive combinators, requiring exactly n normal-order reduction steps to normalize. As a consequence of Curry and Feys's standardization theorem, our reduction grammars form a complete syntactic characterization of normalizing combinatory logic terms. Using them, we provide a recursive method of constructing ordinary generating functions counting the number of SK-combinators reducing in n normal-order reduction steps. Finally, we investigate the size of generated grammars giving a primitive recursive upper bound.

Type
Articles
Copyright
Copyright © Cambridge University Press 2017 

Footnotes

*

This work was partially supported within the Polish National Science Center grant 2013/11/B/ST6/00975.

References

Abramowitz, M. & Stegun, I. (1972) Handbook of Mathematical Functions, with Formulas, Graphs, and Mathematical Tables. Dover Publications.Google Scholar
Barendregt, H. P. (1984) The Lambda Calculus, Its Syntax and Semantics. vol. 103. North Holland.Google Scholar
Bendkowski, M. (2016) Normal-Order Reduction Grammars–Haskell Implementation. Available at: https://github.com/maciej-bendkowski/normal-order-reduction-grammars, Last accessed 03.01.2017.Google Scholar
Bendkowski, M., Grygiel, K. & Zaionc, M. (2015) Asymptotic properties of combinatory logic. In Theory and Applications of Models of Computation, Jain, R., Jain, S. & Stephan, F. (eds), Lecture Notes in Computer Science, vol. 9076. Springer International Publishing, pp. 6272.Google Scholar
Bendkowski, M., Grygiel, K., Lescanne, P. & Zaionc, M. (2016) A natural counting of lambda terms. In SOFSEM 2016: Theory and Practice of Computer Science, Freivalds, R. M., Engels, G. & Catania, B. (eds), Lecture Notes in Computer Science, vol. 9587. Springer International Publishing, pp. 183194.Google Scholar
Bernadet, A. & Lengrand, S. J. (2013) Non-idempotent intersection types and strong normalisation. Log. Methods Comput. Sci. 9 (4), 146.Google Scholar
Bodini, O., Gardy, D., Gittenberger, B. & Gołebiewski, Z. (2015) On the Number of Unary-Binary Tree-Like Structures with Restrictions on the Unary Height. arXiv:1510.01167.Google Scholar
Comon, H., Dauchet, M., Gilleron, R., Löding, C., Jacquemard, F., Lugiez, D., Tison, S. & Tommasi, M. (2007) Tree Automata Techniques and Applications. Available at: http://www.grappa.univ-lille3.fr/tata.release October, 12th 2007.Google Scholar
Curry, H. B. (1930) Grundlagen der kombinatorischen Logik. Am. J. Math. 52 (3), 509536.Google Scholar
Curry, H. B. & Feys, R. (1958) Combinatory Logic, vol. 1. Amsterdam: North Holland.Google Scholar
David, R., Grygiel, K., Kozik, J., Raffalli, C., Theyssier, G. & Zaionc, M. (2013) Asymptotically almost all λ-terms are strongly normalizing. Log. Methods Comput. Sci. 9 (1), 130.Google Scholar
Duchon, P., Flajolet, P., Louchard, G., & Schaeffer, G. (2004) Boltzmann samplers for the random generation of combinatorial structures. Comb. Probab. Comput. 13, 2004.Google Scholar
Flajolet, P. & Sedgewick, R. (2009) Analytic Combinatorics, 1 edn. New York, NY, USA: Cambridge University Press.Google Scholar
Gittenberger, B. & Gołebiewski, Z. (2016) On the number of lambda terms with prescribed size of their De Bruijn representation. In Proceedings of 33rd Symposium on Theoretical Aspects of Computer Science, STACS 2016, February 17–20, 2016, Orléans, France, Ollinger, N. & Vollmer, H. (eds), LIPIcs, vol. 47. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, pp. 40:140:13.Google Scholar
Grygiel, K. & Lescanne, P. (2013) Counting and generating lambda terms. J. Funct. Program. 23 (5), 594628.Google Scholar
Grygiel, K. & Lescanne, P. (2015) Counting and generating terms in the binary lambda calculus. J. Funct. Program. 25, e24 (25 pages).Google Scholar
Pałka, M., Claessen, K., Russo, A. & Hughes, J. (2011) Testing an optimising compiler by generating random lambda terms. In Proceedings of the 6th International Workshop on Automation of Software Test, AST 2011, Waikiki, Honolulu, HI, USA, May 23–24, 2011, Bertolino, A., Foster, H. & Li, J. (eds). ACM.Google Scholar
Schönfinkel, M. (1924) Über die Bausteine der mathematischen Logik. Math. Ann. 92 (3), 305316.Google Scholar
Turner, D. (1979) A new implementation technique for applicative languages. Softw.: Pract. Exp. 9 (1), 3149.Google Scholar
Turner, D. (1986) An overview of Miranda. SIGPLAN Not. 21 (12), 158166.Google Scholar
Wolfram Research, Inc. (2015) Mathematica Version 10.3. Champaign, Illinois.Google Scholar
Submit a response

Discussions

No Discussions have been published for this article.