Hostname: page-component-74656f9884-2dmjx Total loading time: 0 Render date: 2026-11-09T06:51:17.555Z Has data issue: false hasContentIssue false

A call-by-need lambda calculus with locally bottom-avoiding choice: context lemma and correctness of transformations

Published online by Cambridge University Press:  01 June 2008

DAVID SABEL
Affiliation:
Institut für Informatik, Fachbereich Informatik und Mathematik, Johann Wolfgang Goethe-Universität, Postfach 11 19 32, D-60054 Frankfurt, Germany Email: sabel@ki.informatik.uni-frankfurt.de, schauss@ki.informatik.uni-frankfurt.de
MANFRED SCHMIDT-SCHAUSS
Affiliation:
Institut für Informatik, Fachbereich Informatik und Mathematik, Johann Wolfgang Goethe-Universität, Postfach 11 19 32, D-60054 Frankfurt, Germany Email: sabel@ki.informatik.uni-frankfurt.de, schauss@ki.informatik.uni-frankfurt.de
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

We present a higher-order call-by-need lambda calculus enriched with constructors, case expressions, recursive letrec expressions, a seq operator for sequential evaluation and a non-deterministic operator amb that is locally bottom-avoiding. We use a small-step operational semantics in the form of a single-step rewriting system that defines a (non-deterministic) normal-order reduction. This strategy can be made fair by adding resources for book-keeping. As equational theory, we use contextual equivalence (that is, terms are equal if, when plugged into any program context, their termination behaviour is the same), in which we use a combination of may- and must-convergence, which is appropriate for non-deterministic computations. We show that we can drop the fairness condition for equational reasoning, since the valid equations with respect to normal-order reduction are the same as for fair normal-order reduction. We develop a number of proof tools for proving correctness of program transformations. In particular, we prove a context lemma for both may- and must- convergence that restricts the number of contexts that need to be examined for proving contextual equivalence. Combining this with so-called complete sets of commuting and forking diagrams, we show that all the deterministic reduction rules and some additional transformations preserve contextual equivalence. We also prove a standardisation theorem for fair normal-order reduction. The structure of the ordering ≤c is also analysed, and we show that Ω is not a least element and ≤c already implies contextual equivalence with respect to may-convergence.

Information

Type
Paper
Copyright
Copyright © Cambridge University Press 2008