A strong call-by-need calculus - Inria - Institut national de recherche en sciences et technologies du numérique
Pré-Publication, Document De Travail Année : 2021

A strong call-by-need calculus

Résumé

We present a call-by-need λ-calculus that enables strong reduction (that is, reduction inside the body of abstractions) and guarantees that arguments are only evaluated if needed and at most once. This calculus uses explicit substitutions and subsumes the existing strong-call-by-need strategy, but allows for more reduction sequences, and often shorter ones, while preserving the neededness. The calculus is shown to be normalizing in a strong sense: Whenever a λ-term t admits a normal form n in the λ-calculus, then any reduction sequence from t in the calculus eventually reaches a representative of the normal form n. We also exhibit a restriction of this calculus that has the diamond property and that only performs reduction sequences of minimal length, which makes it systematically better than the existing strategy. We have used the Abella proof assistant to formalize part of this calculus, and discuss how this experiment affected its design. In particular, it led us to derive a new description of call-by-need reduction based on inductive rules.
Fichier principal
Vignette du fichier
main.pdf (366.69 Ko) Télécharger le fichier
Origine Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-03409681 , version 1 (29-10-2021)
hal-03409681 , version 2 (02-08-2022)
hal-03409681 , version 3 (06-03-2023)

Identifiants

  • HAL Id : hal-03409681 , version 1

Citer

Thibaut Balabonski, Antoine Lanco, Guillaume Melquiond. A strong call-by-need calculus. 2021. ⟨hal-03409681v1⟩
273 Consultations
106 Téléchargements

Partager

More