The Weak Call-By-Value λ-Calculus is Reasonable for Both Time and Space

02/20/2019
by   Yannick Forster, et al.
0

We study the weak call-by-value λ-calculus as a model for computational complexity theory and establish the natural measures for time and space -- the number of beta-reductions and the size of the largest term in a computation -- as reasonable measures with respect to the invariance thesis of Slot and van Emde Boas [STOC 84]. More precisely, we show that, using those measures, Turing machines and the weak call-by-value λ-calculus can simulate each other within a polynomial overhead in time and a constant factor overhead in space for all computations that terminate in (encodings) of 'true' or 'false'. We consider this result as a solution to the long-standing open problem, explicitly posed by Accattoli [ENTCS 18], of whether the natural measures for time and space of the λ-calculus are reasonable, at least in case of weak call-by-value evaluation. Our proof relies on a hybrid of two simulation strategies of reductions in the weak call-by-value λ-calculus by Turing machines, both of which are insufficient if taken alone. The first strategy is the most naive one in the sense that a reduction sequence is simulated precisely as given by the reduction rules; in particular, all substitutions are executed immediately. This simulation runs within a constant overhead in space, but the overhead in time might be exponential. The second strategy is heap-based and relies on structure sharing, similar to existing compilers of eager functional languages. This strategy only has a polynomial overhead in time, but the space consumption might require an additional factor of n, which is essentially due to the size of the pointers required for this strategy. Our main contribution is the construction and verification of a space-aware interleaving of the two strategies, which is shown to yield both a constant overhead in space and a polynomial overhead in time.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/11/2021

Strong Call by Value is Reasonable for Time

The invariance thesis of Slot and van Emde Boas states that all reasonab...
research
02/13/2021

Strong Call-by-Value is Reasonable, Implosively

Whether the number of beta-steps in the lambda-calculus can be taken as ...
research
04/26/2019

A certifying extraction with time bounds from Coq to call-by-value λ-calculus

We provide a plugin extracting Coq functions of simple polymorphic types...
research
03/01/2022

Reasonable Space for the λ-Calculus, Logarithmically

Can the λ-calculus be considered as a reasonable computational model? Ca...
research
12/22/2022

Time and Space Measures for a Complete Graph Computation Model

We present a computation model based on a subclass of GP 2 graph program...
research
12/16/2022

Call-By-Name Is Just Call-By-Value with Delimited Control

Delimited control operator shift0 exhibits versatile capabilities: it ca...
research
06/22/2020

Constant-Space, Constant-Randomness Verifiers with Arbitrarily Small Error

We study the capabilities of probabilistic finite-state machines that ac...

Please sign up or login with your details

Forgot password? Click here to reset