(Leftmost-Outermost) Beta Reduction is Invariant, Indeed
نویسندگان
چکیده
Slot and van Emde Boas’ weak invariance thesis states that reasonable machines can simulate each other within a polynomial overhead in time. Is λ-calculus a reasonable machine? Is there a way to measure the computational complexity of a λ-term? This paper presents the first complete positive answer to this long-standing problem. Moreover, our answer is completely machine-independent and based on a standard notion in the theory of λ-calculus: the length of a leftmost-outermost derivation to normal form is an invariant, i.e. reasonable, cost model. Such a theorem cannot be proved by directly relating λ-calculus with Turing machines or random access machines, because of the size-explosion problem: there are terms that in a linear number of steps produce an exponentially large output. The first step towards the solution is to shift to a notion of evaluation for which the length and the size of the output are linearly related. This is done by adopting the linear substitution calculus (LSC), a calculus of explicit substitutions modeled after linear logic proof nets and admitting a decomposition of leftmost-outermost derivations with the desired property. Thus, the LSC is invariant with respect to, say, random access machines. The second step is to show that the LSC is invariant with respect to the λ-calculus. The size explosion problem seems to imply that this is not possible: having the same notions of normal form, evaluation in the LSC is exponentially longer than in the λ-calculus. We solve such an impasse by introducing a new form of shared normal form and shared reduction, called useful. Useful evaluation produces a compact, shared representation of the normal form, by avoiding those steps that only unshare the output without contributing to β-redexes, i.e. the steps that cause the blow-up in size. The main technical contribution of the paper is indeed the definition of useful reductions and the thorough analysis of their properties. 2012 ACM CCS: [Theory of computation]: Models of computation—Computability—Lambda calculus; Models of computation—Abstact machines; Logic—Proof theory /Linear logic /Equational logic and rewriting; Computational complexity and cryptography—Complexity theory and logic.
منابع مشابه
Linear Depth Increase of Lambda Terms in Leftmost-Outermost Beta-Reduction Rewrite Sequences
Accattoli and Dal Lago have recently proved that the number of steps in a leftmost-outermost β-reduction rewrite sequence to normal form provides an invariant cost model for the Lambda Calculus. They sketch how to implement leftmost-outermost rewrite sequences on a reasonable machine, with a polynomial overhead, by using simulating rewrite sequences in the linear explicit substitution calculus....
متن کاملBeta Reduction is Invariant, Indeed (Long Version)
Slot and van Emde Boas' weak invariance thesis states that reasonable machines can simulate each other within a polynomially overhead in time. Is l-calculus a reasonable machine? Is there a way to measure the computational complexity of a l-term? This paper presents the first complete positive answer to this long-standing problem. Moreover, our answer is completely machine-independent and based...
متن کاملLeftmost Outermost Revisited
We present an elementary proof of the classical result that the leftmost outermost strategy is normalizing for left-normal orthogonal rewrite systems. Our proof is local and extends to hyper-normalization and weakly orthogonal systems. Based on the new proof, we study basic normalization, i.e., we study normalization if the set of considered starting terms is restricted to basic terms. This all...
متن کاملA Strong Distillery
Abstract machines for the strong evaluation of λ-terms (that is, under abstractions) are a mostly neglected topic, despite their use in the implementation of proof assistants and higher-order logic programming languages. This paper introduces a machine for the simplest form of strong evaluation, leftmost-outermost (call-by-name) evaluation to normal form, proving it correct, complete, and bound...
متن کاملA Universal Unification Algorithm Based on Unification-Driven Leftmost Outermost Narrowing
We formalize a universal uni cation algorithm for the class of equational theories which is induced by the class of canonical totally de ned not strictly subuni able term rewriting systems for short ctn trs For a ctn trs R and for two terms t and s the algorithm computes a ground complete set of ER uni ers of t and s where ER is the set of rewrite rules of R viewed as equations The algorithm is...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- Logical Methods in Computer Science
دوره 12 شماره
صفحات -
تاریخ انتشار 2016