It is well-known that many environment-based abstract machines can be seen as strategies in lambda calculi with explicit substitutions (ES). Recently, graphical syntaxes and linear logic led to the linear substitution calculus (LSC), a new approach to ES that is halfway between small-step calculi and traditional calculi with ES. This paper studies the relationship between the LSC and environment-based abstract machines. While traditional calculi with ES simulate abstract machines, the LSC rather distills them: some transitions are simulated while others vanish, as they map to a notion of structural congruence. The distillation process unveils that abstract machines in fact implement weak linear head reduction, a notion of evaluation having a central role in the theory of linear logic. We show that such a pattern applies uniformly in call-by-name, call-by-value, and call-by-need, catching many machines in the literature. We start by distilling the KAM, the CEK, and a sketch of the ZINC, and then provide simplified versions of the SECD, the lazy KAM, and Sestoft's machine. Along the way we also introduce some new machines with global environments. Moreover, we show that distillation preserves the time complexity of the executions, i.e. the LSC is a complexity-preserving abstraction of abstract machines.
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.[2002] have proposed a strong normalisation function N which they have proved to be correct, in the sense that N computes the normal form of strongly normalising, closed λ-terms. This function essentially consists in iterating the standard (weak) call-by-value (CBV) strategy on terms possibly containing free variables, Grégoire and Leroy [2002] refers to this variant of CBV as symbolic CBV.The starting point of this work is the observation that rather than iterating CBV, one should consider an appropriate notion of call-by-need (CBNd) that computes strong normal forms (of open terms). In this paper we replace symbolic CBV by symbolic CBNd, consisting in iterating the standard CBNd strategy on terms possibly containing free variables. Our strategy computes strong normal forms in which, in contrast to N , arguments are evaluated only if they are needed and, moreover, are evaluated at most once thus avoiding duplication of work. For example, the function N in Grégoire and Leroy [2002] computes the value of the argument (λz.z)(λz.z) in the λ-term (λx .λy.(λz.z)y)((λz.z)(λz.z)) even though this value is not required for the strong normal form of the whole term, whereas our strategy will not. Also, our strategy is normalising, i.e. it computes the normal form of weakly normalising terms, that is, of terms that admit a normal form but whose evaluation may diverge along some other strategies.Defining Strong Call-by-Need. Some of the subtleties involved in developing a theory of CBNd to strong normal form are illustrated next. In what follows, we write ⇝ for denoting the CBNd strategy to strong normal form devised in this paper and motivated below.Consider a term (λx .t )(id id), where id abbreviates the identity term λz.z and t is an arbitrary subterm (in Fig. 1, t is chosen to be λy.yxx). The first reduction step for a term of this shape is a common (weak) call-by-need step: the β-redex (λx .t )(id id) is turned into an explicit binding between the variable x and the argument id id in the expression t, which is often written let x = (id id) in t, or here t[x\id id], wher...
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 © 2025 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.