Results 1 -
5 of
5
FUNDIO: A Lambda-Calculus with a letrec, case, Constructors, and an IO-Interface: Approaching a Theory of unsafePerformIO
, 2003
"... This paper proposes a non-standard way to combine lazy functional languages with I/O. In order to demonstrate the usefulness of the approach, a tiny lazy functional core language “FUNDIO”, which is also a call-by-need lambda calculus, is investigated. The syntax of “FUNDIO ” has case, letrec, constr ..."
Abstract
-
Cited by 7 (0 self)
- Add to MetaCart
This paper proposes a non-standard way to combine lazy functional languages with I/O. In order to demonstrate the usefulness of the approach, a tiny lazy functional core language “FUNDIO”, which is also a call-by-need lambda calculus, is investigated. The syntax of “FUNDIO ” has case, letrec, constructors and an IO-interface: its operational semantics is described by small-step reductions. A contextual approximation and equivalence depending on the input-output behavior of normal order reduction sequences is defined and a context lemma is proved. This enables to study a semantics of “FUNDIO ” and its semantic properties. The paper demonstrates that the technique of complete reduction diagrams enables to show a considerable set of program transformations to be correct. Several optimizations of evaluation are given, including strictness optimizations and an abstract machine, and shown to be correct w.r.t. contextual equivalence. Correctness of strictness optimizations also justifies correctness of parallel evaluation.
Thus this calculus has a potential to integrate non-strict functional programming with a non-deterministic approach to input-output and also to provide a useful semantics for this combination.
It is argued that monadic IO and unsafePerformIO can be combined in Haskell, and that the result is reliable, if all reductions and transformations are correct w.r.t. to the FUNDIO-semantics. Of course, we do not address the typing problems the are involved in the usage of Haskell’s
unsafePerformIO.
The semantics can also be used as a novel semantics for strict functional languages with IO, where the sequence of IOs is not fixed.
Bidomains and full abstraction for countable non-determinism
- In Proceedings of FoSSaCS’06, number 3921 in LNCS
, 2006
"... Abstract. We describe a denotational semantics for a sequential functional language with random number generation over a countably infinite set (the natural numbers), and prove that it is fully abstract with respect to may-and-must testing. Our model is based on biordered sets similar to Berry’s bid ..."
Abstract
-
Cited by 6 (2 self)
- Add to MetaCart
Abstract. We describe a denotational semantics for a sequential functional language with random number generation over a countably infinite set (the natural numbers), and prove that it is fully abstract with respect to may-and-must testing. Our model is based on biordered sets similar to Berry’s bidomains, and stable, monotone functions. However, (as in prior models of unbounded non-determinism) these functions may not be continuous. Working in a biordered setting allows us to exploit the different properties of both extensional and stable orders to construct a Cartesian closed category of sequential, discontinuous functions, with least and greatest fixpoints having strong enough properties to prove computational adequacy. We establish full abstraction of the semantics by showing that it contains a simple, first-order “universal type-object ” within which all types may be embedded using functions defined by (countable) ordinal induction. 1
Unique Fixed Point Induction for McCarthy's Amb
- IN: PROCEEDINGS OF THE 24TH INTERNATIONAL SYMPOSIUM ON MATHEMATICAL FOUNDATIONS OF COMPUTER SCIENCE, ”LNCS” 1672
, 1999
"... We develop an operational theory of higher-order functions, recursion, and fair non-determinism for a non-trivial, higher-order, call-by-name functional programming language extended with McCarthy's amb. Implemented via fair parallel evaluation, functional programming with amb is very expressive. ..."
Abstract
-
Cited by 6 (1 self)
- Add to MetaCart
We develop an operational theory of higher-order functions, recursion, and fair non-determinism for a non-trivial, higher-order, call-by-name functional programming language extended with McCarthy's amb. Implemented via fair parallel evaluation, functional programming with amb is very expressive. However, conventional semantic fixed point principles for reasoning about recursion fail in the presence of fairness. Instead, we adapt higher-order operational methods to deal with fair non-determinism. We present two natural semantics, describing mayand must-convergence, and define a notion of contextual equivalence over these two modalities. The presence of amb raises special difficulties when reasoning about contextual equivalence. In particular, we report on a challenging open problem with regard to the validity of bisimulation proof methods. We develop two sound and useful reasoning methods which, in combination, enable us to prove a rich collection of laws for contextual...
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 ω.
MFPS 2011 From Applicative to Environmental
"... We illuminate important aspects of the semantics of higher-order functions that are common in the presence of local state, exceptions, names and type abstraction via a series of examples that add to those given by Stark. Most importantly we show that any of these language features gives rise to the ..."
Abstract
- Add to MetaCart
We illuminate important aspects of the semantics of higher-order functions that are common in the presence of local state, exceptions, names and type abstraction via a series of examples that add to those given by Stark. Most importantly we show that any of these language features gives rise to the phenomenon that certain behaviour of higher-order functions can only be observed by providing them with arguments which internally call the functions again. Other examples show the need for the observer to accumulate values received from the program and generate new names. This provides evidence for the necessity of complex conditions for functions in the definition of environmental bisimulation, which deviates in each of these ways from that of applicative bisimulation. Keywords: Environmental bisimulation, applicative bisimulation, local state, existential types.

