Abstract
We present a call-by-need strategy for computing strong normal forms of open terms (reduction is admitted inside the body of abstractions and substitutions, and the terms may contain free variables), which guarantees that arguments are only evaluated when needed and at most once. The strategy is shown to be complete with respect to β-reduction to strong normal form. The proof of completeness relies on two key tools: (1) the definition of a strong call-by-need calculus where reduction may be performed inside any context, and (2) the use of non-idempotent intersection types. More precisely, terms admitting a β-normal form in pure lambda calculus are typable, typability implies (weak) normalisation in the strong call-by-need calculus, and weak normalisation in the strong call-by-need calculus implies normalisation in the strong call-by-need strategy. Our (strong) call-by-need strategy is also shown to be conservative over the standard (weak) call-by-need.
- Beniamino Accattoli. 2012. An Abstract Factorization Theorem for Explicit Substitutions. In 23rd International Conference on Rewriting Techniques and Applications (RTA’12), May 28 - June 2, 2012, Nagoya, Japan (LIPIcs), Ashish Tiwari (Ed.), Vol. 15. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 6–21.Google Scholar
- Beniamino Accattoli, Pablo Barenbaum, and Damiano Mazza. 2014. Distilling abstract machines. In Proceedings of the 19th ACM SIGPLAN international conference on Functional programming (ICFP’14), Gothenburg, Sweden, September 1-3, 2014, Johan Jeuring and Manuel M. T. Chakravarty (Eds.). ACM, 363–376. Google Scholar
Digital Library
- Beniamino Accattoli, Pablo Barenbaum, and Damiano Mazza. 2015. A Strong Distillery. In Programming Languages and Systems - 13th Asian Symposium (APLAS’15), Pohang, South Korea, November 30 - December 2, 2015. (LNCS), Xinyu Feng and Sungwoo Park (Eds.), Vol. 9458. Springer Verlag, 231–250. Google Scholar
Cross Ref
- Beniamino Accattoli and Giulio Guerrieri. 2016. Open Call-by-Value. In Programming Languages and Systems - 14th Asian Symposium (APLAS’16), Hanoi, Vietnam, November 21-23, 2016. (LNCS), Atsushi Igarashi (Ed.), Vol. 10017. Springer, 206–226. Google Scholar
Cross Ref
- Beniamino Accattoli and Delia Kesner. 2010. The Structural lambda-Calculus. In Computer Science Logic, 24th International Workshop (CSL’10), 19th Annual Conference of the EACSL, Brno, Czech Republic, August 23-27, 2010. (LNCS), Anuj Dawar and Helmut Veith (Eds.), Vol. 6247. Springer Verlag, 381–395.Google Scholar
- Beniamino Accattoli and Ugo Dal Lago. 2016. (Leftmost-Outermost) Beta Reduction is Invariant, Indeed. Logical Methods in Computer Science 12, 1 (2016), 1–46. Google Scholar
Cross Ref
- Zena M. Ariola and Matthias Felleisen. 1997. The Call-By-Need Lambda Calculus. Journal of Functional Programming 7, 3 (1997), 265–301. Google Scholar
Digital Library
- Zena M. Ariola, Matthias Felleisen, John Maraist, Martin Odersky, and Philip Wadler. 1995. The Call-by-Need Lambda Calculus. In Conference Record of POPL’95: 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, San Francisco, California, USA, January 23-25, 1995, Ron K. Cytron and Peter Lee (Eds.). ACM Press, 233–246. Google Scholar
Digital Library
- Andrea Asperti and Stefano Guerrini. 1998. The Optimal Implementation of Functional Programming Languages. Cambridge Tracts in Theoretical Computer Science, Vol. 45. Cambridge University Press.Google Scholar
Digital Library
- Thibaut Balabonski. 2013. Weak optimality, and the meaning of sharing. In ACM SIGPLAN International Conference on Functional Programming (ICFP’13), Boston, MA, USA - September 25 - 27, 2013, Greg Morrisett and Tarmo Uustalu (Eds.). ACM, 263–274. Google Scholar
Digital Library
- Hendrik Pieter Barendregt, Jan A. Bergstra, Jan Willem Klop, and Henri Volken. 1976. Some Notes on Lambda Reduction. Technical Report 22. University of Utrecht, Department of mathematics. 13–53 pages.Google Scholar
- B. Barras. 2017. Personal Communication. (February 2017).Google Scholar
- Alexis Bernadet and Stéphane Lengrand. 2011. Complexity of strongly normalising λ-terms via non-idempotent intersection types. In Foundations of Software Science and Computation Structures (FOSSACS) (LNCS), Martin Hofmann (Ed.), Vol. 6604. Springer Verlag, 88–107. Google Scholar
Cross Ref
- Alexis Bernadet and Stéphane Lengrand. 2013. Non-idempotent intersection types and strong normalisation. Logical Methods in Computer Science 9, 4 (2013), 1–46. Google Scholar
Cross Ref
- Mathieu Boespflug, Maxime Dénès, and Benjamin Grégoire. 2011. Full Reduction at Full Throttle. In Certified Programs and Proofs - First International Conference (CPP’11), Kenting, Taiwan, December 7-9, 2011. (LNCS), Jean-Pierre Jouannaud and Zhong Shao (Eds.), Vol. 7086. Springer, 362–377. Google Scholar
Digital Library
- Antonio Bucciarelli, Delia Kesner, and Daniel Ventura. 2017. Non-Idempotent Intersection Types for the Lambda-Calculus. Logic Journal of the IGPL (2017). To appear.Google Scholar
- Stephen Chang and Matthias Felleisen. 2012. The Call-by-Need Lambda Calculus, Revisited. In Programming Languages and Systems - 21st European Symposium on Programming (ESOP’12), Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2012, Tallinn, Estonia, March 24 - April 1, 2012. (LNCS), Helmut Seidl (Ed.), Vol. 7211. Springer Verlag, 128–147.Google Scholar
- Mario Coppo and Mariangiola Dezani-Ciancaglini. 1980. An extension of the basic functionality theory for the λ-calculus. Notre Dame Journal of Formal Logic 21, 4 (1980), 685–693. Google Scholar
Cross Ref
- Mario Coppo, Mariangiola Dezani-Ciancaglini, and Betti Venneri. 1981. Functional Characters of Solvable Terms. Mathematical Logic Quarterly 27, 2-6 (1981), 45–58.Google Scholar
Cross Ref
- Pierre Crégut. 1990. An Abstract Machine for Lambda-Terms Normalization. In LISP and Functional Programming. ACM, 333–340. Google Scholar
Digital Library
- Pierre Crégut. 2007. Strongly reducing variants of the Krivine abstract machine. Higher-Order and Symbolic Computation 20, 3 (2007), 209–230. Google Scholar
Digital Library
- Olivier Danvy and Ian Zerny. 2013. A synthetic operational account of call-by-need evaluation, See [ Peña and Schrijvers 2013 ], 97–108.Google Scholar
- Erika De Benedetti and Simona Ronchi Della Rocca. 2013. Bounding normalization time through intersection types. In Proceedings of Sixth Workshop on Intersection Types and Related Systems (ITRS) (Electronic Proceedings in Theoretical Computer Science), Luca Paolini (Ed.), Vol. 121. Cornell University Library, 48–57. Google Scholar
Cross Ref
- Daniel de Carvalho. 2007. Sémantiques de la logique linéaire et temps de calcul. Ph.D. Dissertation. Universit é Aix-Marseille II.Google Scholar
- Daniel de Carvalho. 2009. Execution Time of lambda-Terms via Denotational Semantics and Intersection Types. CoRR abs/0905.4251 (2009), 1–36.Google Scholar
- Thomas Ehrhard and Laurent Regnier. 2006. Böhm Trees, Krivine’s Machine and the Taylor Expansion of Lambda-Terms. In Logical Approaches to Computational Barriers, Second Conference on Computability in Europe (CiE’06), Swansea, UK, June 30-July 5, 2006. (LNCS), Arnold Beckmann, Ulrich Berger, Benedikt Löwe, and John V. Tucker (Eds.), Vol. 3988. Springer Verlag, 186–197.Google Scholar
- Philippa Gardner. 1994. Discovering Needed Reductions Using Type Theory. In International Conference on Theoretical Aspects of Computer Software (TACS’94) (LNCS), Masami Hagiya and John C. Mitchell (Eds.), Vol. 789. Springer Verlag, 555–574. Google Scholar
Cross Ref
- Benjamin Grégoire and Xavier Leroy. 2002. A compiled implementation of strong reduction. In Proceedings of the Seventh ACM SIGPLAN International Conference on Functional Programming (ICFP ’02), Pittsburgh, Pennsylvania, USA, October 4-6, 2002., Mitchell Wand and Simon L. Peyton Jones (Eds.). ACM, 235–246. Google Scholar
Digital Library
- Peter Henderson and James H. Morris. 1976. A Lazy Evaluator. In Conference Record of the Third ACM Symposium on Principles of Programming Languages (POPL’76), Atlanta, Georgia, USA, January 1976, Susan L. Graham, Robert M. Graham, Michael A. Harrison, William I. Grosky, and Jeffrey D. Ullman (Eds.). ACM Press, 95–103. Google Scholar
Digital Library
- Simon L. Peyton Jones. 1987. The Implementation of Functional Programming Languages. Prentice-Hall.Google Scholar
- Delia Kesner. 2009. A Theory of Explicit Substitutions with Safe and Full Composition. Logical Methods in Computer Science 5, 3 (2009), 1–29. http://arxiv.org/abs/0905.2539 Google Scholar
Cross Ref
- Delia Kesner. 2016. Reasoning About Call-by-need by Means of Types. In Foundations of Software Science and Computation Structures - 19th International Conference (FOSSACS’16), Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2016, Eindhoven, The Netherlands, April 2-8, 2016. (LNCS), Bart Jacobs and Christof Löding (Eds.), Vol. 9634. Springer Verlag, 424–441. Google Scholar
Cross Ref
- Delia Kesner and Daniel Ventura. 2014. Quantitative Types for the Linear Substitution Calculus. In Theoretical Computer Science - 8th IFIP TC 1/WG 2.2 International Conference (TCS’14), Rome, Italy, September 1-3, 2014. (LNCS), Josep Díaz, Ivan Lanese, and Davide Sangiorgi (Eds.), Vol. 8705. Springer Verlag, 296–310. Google Scholar
Cross Ref
- Delia Kesner and Daniel Ventura. 2015. A resource aware computational interpretation for Herberlin’s syntax. In Theoretical Aspects of Computing (ICTAC) (LNCS), Martin Leucker, Camilo Rueda, and Frank D. Valencia (Eds.), Vol. 9399. Springer Verlag, 1–16.Google Scholar
- Assaf J. Kfoury. 2000. A linearization of the Lambda-calculus and consequences. J. Log. Comput. 10, 3 (2000), 411–436. Google Scholar
Cross Ref
- Assaf J. Kfoury and Joe Wells. 2004. Principality and type inference for intersection types using expansion variables. Theoretical Computer Science 311, 1-3 (2004), 1–70.Google Scholar
Digital Library
- Jean-Louis Krivine. 1993. Lambda-calculus, types and models. Ellis Horwood.Google Scholar
- John Lamping. 1990. An algorithm for optimal lambda calculus reduction. In Procedings of POPL. ACM, San Francisco, California, 16–30. Google Scholar
Digital Library
- John Launchbury. 1993. A Natural Semantics for Lazy Evaluation. In Conference Record of the Twentieth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Charleston, South Carolina, USA, January 1993, Mary S. Van Deusen and Bernard Lang (Eds.). ACM Press, 144–154. Google Scholar
Digital Library
- Jean-Jacques Lévy. 1980. Optimal Reductions in the lambda-calculus. In To Haskell Brooks Curry: Essays in Combinatory Logic, Lambda Calculus and formalism, Roger Hindley and Jonathan P. Seldin (Eds.). Academic Press, 159–191.Google Scholar
- John Maraist, Martin Odersky, and Philip Wadler. 1998. The Call-by-Need Lambda Calculus. Journal of Functional Programming 8, 3 (1998), 275–317. Google Scholar
Digital Library
- Robin Milner. 2007. Local Bigraphs and Confluence: Two Conjectures: (Extended Abstract). Electronic Notes in Theoretical Computer Science 175, 3 (2007), 65–73. Google Scholar
Digital Library
- Ricardo Peña and Tom Schrijvers (Eds.). 2013. 15th International Symposium on Principles and Practice of Declarative Programming (PPDP ’13), Madrid, Spain, September 16-18, 2013. ACM. Google Scholar
Digital Library
- William Tait. 1967. Intensional interpretation of functionals of finite type I. Journal of Symbolic Logic 32, 2 (1967), 198–212. Google Scholar
Cross Ref
- The Coq Development Team. 2017. The Coq Proof Assistant (v8.6). (2017). https://github.com/coq/coq .Google Scholar
- Steffen van Bakel. 1992. Complete Restrictions of the Intersection Type Discipline. Theoretical Computer Science 102, 1 (1992), 135–163. Google Scholar
Digital Library
- Christopher P. Wadsworth. 1971. Semantics and Pragmatics of the Lambda Calculus. Ph.D. Dissertation. Oxford University.Google Scholar
Index Terms
Foundations of strong call by need
Recommendations
Classical By-Need
Proceedings of the 25th European Symposium on Programming Languages and Systems - Volume 9632Call-by-need calculi are complex to design and reason with. When adding control effects, the very notion of canonicity is irremediably lost, the resulting calculi being necessarily ad hoc. This calls for a design of call-by-need guided by logical rather ...
Foundations of Paraconsistent Resolution
An extended first-order predicate sequent calculus PLK with two kinds of negation is introduced as a basis of a new resolution calculus PRC (paraconsistent resolution calculus) for handling the property of paraconsistency. Herbrand theorem, completeness ...
Foundations of Paraconsistent Resolution
An extended first-order predicate sequent calculus PLK with two kinds of negation is introduced as a basis of a new resolution calculus PRC (paraconsistent resolution calculus) for handling the property of paraconsistency. Herbrand theorem, completeness ...






Comments