Results 1 -
6 of
6
A call-by-need lambda-calculus with locally bottom-avoiding choice: Context lemma and correctness of transformations
- MATHEMATICAL STRUCTURES IN COMPUTER SCIENCE
, 2008
"... 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 form of a sin ..."
Abstract
-
Cited by 12 (9 self)
- Add to MetaCart
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 form of a single-step rewriting system that defines a (nondeterministic) normal order reduction. This strategy can be made fair by adding resources for bookkeeping. As equational theory we use contextual equivalence, i.e. terms are equal if plugged into any program context their termination behaviour is the same, where we use a combination of may- as well as 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 w.r.t. normal order reduction are the same as for fair normal order reduction. We evolve different proof tools for proving correctness of program transformations, in particular, a context lemma for may- as well as mustconvergence is proved, which restricts the number of contexts that need to be examined for proving contextual equivalence. In combination with so-called complete sets of commuting and forking diagrams we show that
all the deterministic reduction rules and also 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: Ω is not a least element, and <=c already implies contextual equivalence w.r.t. may-convergence.
Divergenceleast semantics of amb is Hoare
- Short presentation at the APPSEM II workshop, Frauenchiemsee
, 2005
"... Abstract This note strengthens the hoary observation that McCarthy’s amb is not monotone with respect to the Smyth and Plotkin powerdomains. It shows that there is no least fixpoint semantics for amb that is sensitive to divergence. This paper is concerned with an erratic choice operator M|M ′ , and ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
Abstract This note strengthens the hoary observation that McCarthy’s amb is not monotone with respect to the Smyth and Plotkin powerdomains. It shows that there is no least fixpoint semantics for amb that is sensitive to divergence. This paper is concerned with an erratic choice operator M|M ′ , and an ambiguous choice operator M amb M ′. Recall that M|M ′ means: either evaluate M or evaluate M ′. And M amb M ′ means: evaluate both M and M ′ on an arbitrary fair scheduler, and return whatever answer you get first. We defer the study of ambiguous choice until Sect. 2. 1 Erratic Choice Suppose we have a language L containing the following: – a boolean type bool, equipped with constants t and f, and a conditional operator if M then N else N ′ at every type – a natural number type nat, equipped with a constant n for each n ∈ N, and an equality operator N = N ′ – a term d (short for diverge) at every type
Step-Indexed Relational Reasoning for Countable Nondeterminism
"... Programming languages with countable nondeterministic choice are computationally interesting since countable nondeterminism arises when modeling fairness for concurrent systems. Because countable choice introduces non-continuous behaviour, it is well-known that developing semantic models for program ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
Programming languages with countable nondeterministic choice are computationally interesting since countable nondeterminism arises when modeling fairness for concurrent systems. Because countable choice introduces non-continuous behaviour, it is well-known that developing semantic models for programming languages with countable nondeterminism is challenging. We present a step-indexed logical relations model of a higher-order functional programming language with countable nondeterminism and demonstrate how it can be used to reason about contextually defined may- and must-equivalence. In earlier step-indexed models, the indices have been drawn from ω. Here the step-indexed relations for must-equivalence are indexed over an ordinal greater than ω.
Infinitary Howe's Matrix
"... Howe’s method is a well-known technique for proving that various kinds of applicative bisimilarity (or similarity) on a functional language are congruences (or precongruences). It proceeds by constructing an extension of the given relation that has certain special properties. The method can be used ..."
Abstract
- Add to MetaCart
Howe’s method is a well-known technique for proving that various kinds of applicative bisimilarity (or similarity) on a functional language are congruences (or precongruences). It proceeds by constructing an extension of the given relation that has certain special properties. The method can be used for deterministic and for erratically nondeterministic languages, but in the latter case it has a strange limitation: it requires the language’s syntax to be finitary. That excludes, for example, languages with countable sum types, and has repeatedly caused problems in the literature. In this paper, we give a variation on Howe’s method, called “infinitary Howe’s method”, that avoids this problem. The method involves defining two extensions of the original relation by mutual coinduction. Both extensions possess the key properties of Howe’s extension, but it is their intersection that is compatible. In the first part of the paper, we see how this works for a call-by-value language with countable sum types. In the second part, we see that the method continues to work when we make the syntax non-well-founded. More precisely, we show, using a mixed inductive/coinductive argument, that the various forms of applicative similarity and bisimilarity are preserved by any substituting context.
On the representation of McCarthy’s ambin the π-calculus
, 2004
"... We study the encoding of λ [] , the call by name λ-calculus enriched with McCarthy’s amb operator, into the π-calculus. Semantically, amb is a challenging operator, for the fairness constraints that it expresses. We prove that, under a certain interpretation of divergence in the λ-calculus (weak div ..."
Abstract
- Add to MetaCart
We study the encoding of λ [] , the call by name λ-calculus enriched with McCarthy’s amb operator, into the π-calculus. Semantically, amb is a challenging operator, for the fairness constraints that it expresses. We prove that, under a certain interpretation of divergence in the λ-calculus (weak divergence), a faithful encoding is impossible. However, with a different interpretation of divergence (strong divergence), the encoding is possible, and for this case we derive results and coinductive proof methods to reason about λ [] that are similar to those for the encoding of pure λ-calculi. We then use these methods to derive the most important laws concerning amb. We take bisimilarity as behavioural equivalence on the π-calculus, which sheds some light on the relationship between fairness and bisimilarity.

