Abstract
We give extensional and intensional characterizations of functional programs with nondeterminism: as structure preserving functions between biorders, and as nondeterministic sequential algorithms on ordered concrete data structures which compute them. A fundamental result establishes that these extensional and intensional representations are equivalent, by showing how to construct the unique sequential algorithm which computes a given monotone and stable function, and describing the conditions on sequential algorithms which correspond to continuity with respect to each order. We illustrate by defining may-testing and must-testing denotational semantics for sequential functional languages with bounded and unbounded choice operators. We prove that these are computationally adequate, despite the non-continuity of the must-testing semantics of unbounded nondeterminism. In the bounded case, we prove that our continuous models are fully abstract with respect to may-testing and must-testing by identifying a simple universal type, which may also form the basis for models of the untyped {\lambda}-calculus. In the unbounded case we observe that our model contains computable functions which are not denoted by terms, by identifying a further "weak continuity" property of the definable elements, and use this to establish that it is not fully abstract.
Highlights
This paper describes denotational models of sequential higher-order functional computation with nondeterminism, which may be given as an explicit choice operation or arise via an under-specified operational semantics or abstract interpretation of a richer language
We illustrate by defining may-testing and must-testing denotational semantics for sequential functional languages with bounded and unbounded choice operators
We identify a new property of programs with unbounded nondeterminism — that they preserve suprema of extensional chains, but only up to stable approximation — which is most naturally presented as a weak continuity property
Summary
This paper describes denotational models of sequential higher-order functional computation with nondeterminism, which may be given as an explicit choice operation or arise via an under-specified operational semantics or abstract interpretation of a richer language. Interpreting nondeterminism in a sequential setting presents some novel challenges for denotational semantics — for example, accurately representing the branching points within a program at which choices are made. Unbounded nondeterminism allows programs to be written which will always return a value but may take an unbounded number of steps to do so (corresponding to the notion of fairness [Dji76]). We take an approach which relates extensional and intensional representations of nondeterministic functional programs, by developing the theory of biorders (sets with two partial orders) and applying it to nondeterminism, and defining a new notion of ordered. Key words and phrases: Nondeterminism, Denotational Semantics, Biorders, Sequential algorithms
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have