Towards the average-case analysis of substitution resolution in λ-calculus

12/11/2018
by   Maciej Bendkowski, et al.
0

Substitution resolution supports the computational character of β-reduction, complementing its execution with a capture-avoiding exchange of terms for bound variables. Alas, the meta-level definition of substitution, masking a non-trivial computation, turns β-reduction into an atomic rewriting rule, despite its varying operational complexity. In the current paper we propose a somewhat indirect average-case analysis of substitution resolution in the classic λ-calculus, based on the quantitative analysis of substitution in λυ, an extension of λ-calculus internalising the υ-calculus of explicit substitutions. Within this framework, we show that for any fixed n ≥ 0, the probability that a uniformly random, conditioned on size, λυ-term υ-normalises in n normal-order (i.e. leftmost-outermost) reduction steps tends to a computable limit as the term size tends to infinity. For that purpose, we establish an effective hierarchy (G_n)_n of regular tree grammars partitioning υ-normalisable terms into classes of terms normalising in n normal-order rewriting steps. The main technical ingredient in our construction is an inductive approach to the construction of G_n+1 out of G_n based, in turn, on the algorithmic construction of finite intersection partitions, inspired by Robinson's unification algorithm. Finally, we briefly discuss applications of our approach to other term rewriting systems, focusing on two closely related formalisms, i.e. the full λυ-calculus and combinatory logic.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/11/2018

Combinatorics of explicit substitutions

λυ is an extension of the λ-calculus which internalises the calculus of ...
research
10/11/2022

Stateful Realizers for Nonstandard Analysis

In this paper we propose a new approach to realizability interpretations...
research
12/27/2018

Towards a Semantic Measure of the Execution Time in Call-by-Value lambda-Calculus (Long Version)

We investigate the possibility of a semantic account of the execution ti...
research
04/23/2019

Towards a Semantic Measure of the Execution Time in Call-by-Value lambda-Calculus

We investigate the possibility of a semantic account of the execution ti...
research
05/04/2023

How To Play The Accordion. On the (Non-)Conservativity of the Reduction Induced by the Taylor Approximation of λ-Terms

The Taylor expansion, which stems from Linear Logic and its differential...
research
01/11/2022

A Faithful and Quantitative Notion of Distant Reduction for Generalized Applications (Long Version)

We introduce a call-by-name lambda-calculus λ J with generalized applica...
research
02/02/2018

Counting Environments and Closures

Environments and closures are two of the main ingredients of evaluation ...

Please sign up or login with your details

Forgot password? Click here to reset