A cornerstone of the theory of λ-calculus is that intersection types characterise termination properties. They are a flexible tool that can be adapted to various notions of termination, and that also induces adequate denotational models. Since the seminal work of de Carvalho in 2007, it is known that multi types (i.e. non-idempotent intersection types) refine intersection types with quantitative information and a strong connection to linear logic. Typically, type derivations provide bounds for evaluation lengths, and minimal type derivations provide exact bounds. De Carvalho studied call-by-name evaluation, and Kesner used his system to show the termination equivalence of call-by-need and call-byname. De Carvalho's system, however, cannot provide exact bounds on call-by-need evaluation lengths. In this paper we develop a new multi type system for call-by-need. Our system produces exact bounds and induces a denotational model of callby-need, providing the first tight quantitative semantics of call-by-need.
A cornerstone of the theory of λ-calculus is that intersection types characterise termination properties. They are a flexible tool that can be adapted to various notions of termination, and that also induces adequate denotational models. Since the seminal work of de Carvalho in 2007, it is known that multi types (i.e. non-idempotent intersection types) refine intersection types with quantitative information and a strong connection to linear logic. Typically, type derivations provide bounds for evaluation lengths, and minimal type derivations provide exact bounds. De Carvalho studied call-by-name evaluation, and Kesner used his system to show the termination equivalence of call-by-need and call-byname. De Carvalho's system, however, cannot provide exact bounds on call-by-need evaluation lengths. In this paper we develop a new multi type system for call-by-need. Our system produces exact bounds and induces a denotational model of callby-need, providing the first tight quantitative semantics of call-by-need.In CbV, t evaluates with 5 multiplicative steps and 5 exponential steps, for instance from right to left, as follows:Note that the fact that CbN and CbV take the same number of steps is by chance, as they reduce different redexes: CbN never reduce the unneeded redex II associated to y, but it reduces twice the needed II redex associated to x, while CbV reduces both, but each one only once.
This paper explores two topics at once: the use of denotational semantics to bound the evaluation length of functional programs, and the semantics of strong (that is, possibly under abstractions) call-by-value evaluation.About the first, we analyze de Carvalho's seminal use of relational semantics for bounding the evaluation length of λ-terms, starting from the presentation of the semantics as an intersection types system. We focus on the part of his work which is usually neglected in its many recent adaptations, despite being probably the conceptually deeper one: how to transfer the bounding power from the type system to the relational semantics itself. We dissect this result and re-understand it via the isolation of a simpler size representation property.About the second, we use relational semantics to develop a semantical study of strong call-by-value evaluation, which is both a delicate and neglected topic. We give a semantic characterization of terms normalizable with respect to strong evaluation, providing in particular the first result of adequacy with respect to strong call-by-value. Moreover, we extract bounds about strong evaluation from both the type systems and the relational semantics.Essentially, we use strong call-by-value to revisit de Carvalho's semantic bounds, and de Carvalho's technique to provide semantical foundations for strong call-by-value. B. The Semantics of Strong Call-by-ValuePlotkin's call-by-value λ-calculus [44] is at the heart of programming languages such as OCaml and proof assistants such as Coq. In the study of programming languages, call-by-value (CbV) evaluation is usually weak, that is, it does not reduce under abstractions, and terms are assumed to be closed, i.e., without free variables. These constraints give rise to an elegant framework-we call it Closed CbV, following [8].It often happens, however, that one needs to go beyond Closed CbV by considering Strong CbV, which is the extended setting where reduction under abstractions is allowed and terms may be open, or the intermediate framework of Open CbV, where evaluation is weak but terms are not necessarily closed. The need arises, most notably, when describing the implementation model of Coq, as done by Grégoire and Leroy [28], to realize the essential conversion test for dependent types. Other motivations lie in the study of bisimulations by Lassen [37], partial evaluation [34], or various topics of a semantical or logical nature, recalled below.Naïve Extension of CbV. In call-by-name (CbN) turning to open terms or strong evaluation is harmless because CbN does not impose any special form to the arguments of β-redexes. On the contrary, turning to Open or Strong CbV is delicate. While some fundamental properties such as confluence and standardization hold also in such cases, as showed by Plotkin's himself [44], others-typically of a semantical nature-break as soon as one considers open terms.The problems of Strong CbV can be traced back to Plotkin's seminal paper, where he points out the incompleteness of CbV with respe...
This paper studies useful sharing, which is a sophisticated optimization for λ-calculi, in the context of call-by-need evaluation in presence of open terms. Useful sharing turns out to be harder to manipulate in call-byneed than in call-by-name or call-by-value, because call-by-need evaluates inside environments, making it harder to specify when a substitution step is useful. We isolate the key involved concepts and prove the correctness of useful sharing in this setting.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
customersupport@researchsolutions.com
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Copyright © 2024 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.