Paul Blain Levy
University of Birmingham
Network
Latest external collaboration on country level. Dive into details by clicking on the dots.
Publication
Featured researches published by Paul Blain Levy.
typed lambda calculus and applications | 2003
Paul Blain Levy
Call-by-push-value (CBPV) is a new programming language paradigm, based on the slogan “a value is, a computation does”. We claim that CBPV provides the semantic primitives from which the call-by-value and call-by-name paradigms are built. The primary goal of the thesis is to present the evidence for this claim, which is found in a remarkably wide range of semantics: from operational semantics, in big-step form and in machine form, to denotational models using domains, possible worlds, continuations and games. In the first part of the thesis, we come to CBPV and its equational theory by looking critically at the call-by-value and call-by-name paradigms in the presence of general computational effects. We give a Felleisen/Friedman-style CK-machine semantics, which explains how CBPV can be understood in terms of push/pop instructions. In the second part we give simple CBPV models for printing, divergence, global store, errors, erratic choice and control effects, as well as for various combinations of these effects. We develop the store model into a possible world model for cell generation, and (following Steele) we develop the control model into a “jumping implementation” using a continuation language called JumpWith-Argument (JWA). We present a pointer game model for CBPV, in the style of Hyland and Ong. We see that the game concepts of questioning and answering correspond to the CBPV concepts of forcing and producing respectively. We observe that this game semantics is closely related to the jumping implementation. In the third part of the thesis, we study the categorical semantics for the CBPV equational theory. We present and compare 3 approaches: models using strong monads, in the style of Moggi; models using value/producer structures, in the style of Power and Robinson; models using (strong) adjunctions. All the concrete models in the thesis are seen to be adjunction models. Submitted for the degree of Doctor of Philosophy Queen Mary and Westfield College, University of London 2001
Information & Computation | 2003
Paul Blain Levy; John Power; Hayo Thielecke
In categorical semantics, there have traditionally been two approaches to modelling environments, one by use of finite products in cartesian closed categories, the other by use of the base categories of indexed categories with structure. Each requires modifications in order to account for environments in call-by-value programming languages. There have been two more general definitions along both of these lines: the first generalising from cartesian to symmetric premonoidal categories, the second generalising from indexed categories with specified structure to κ-categories. In this paper, we investigate environments in call-by-value languages by analysing a fine-grain variant of Moggi’s computational λ-calculus, giving two equivalent sound and complete classes of models: one given by closed Freyd categories, which are based on symmetric premonoidal categories, the other given by closed κ-categories.
computer science logic | 2002
Paul Blain Levy
We describe a simple denotational semantics, using possible worlds, for a call-by-value language with ML-like storage facilities, allowing the storage of values of any type, and the generation of new storage cells. We first present a criticismof traditional Strachey semantics for such a language: that it requires us to specify what happens when we read non-existent cells. We then obtain our model by modifying the Strachey semantics to avoid this problem.We describe our model in 3 stages: first no storage of functions or recursion (but allowing storage of cells), then we add recursion, and finally we allow storage of functions. We discuss similarities and differences between our model and Moggis model of ground store. A significant difference is that our model does not use monadic decomposition of the function type.
Theoretical Computer Science | 2007
Martin Hyland; Paul Blain Levy; Gordon D. Plotkin; John Power
We consider the natural combinations of algebraic computational effects such as side-effects, exceptions, interactive input/output, and nondeterminism with continuations. Continuations are not an algebraic effect, but previously developed combinations of algebraic effects given by sum and tensor extend, with effort, to include commonly used combinations of the various algebraic effects with continuations. Continuations also give rise to a third sort of combination, that given by applying the continuations monad transformer to an algebraic effect. We investigate the extent to which sum and tensor extend from algebraic effects to arbitrary monads, and the extent to which Felleisen et al.s C operator extends from continuations to its combination with algebraic effects. To do all this, we use Dubucs characterisation of strong monads in terms of enriched large Lawvere theories.
Higher-order and Symbolic Computation \/ Lisp and Symbolic Computation | 2006
Paul Blain Levy
We present the call-by-push-value (CBPV) calculus, which decomposes the typed call-by-value (CBV) and typed call-by-name (CBN) paradigms into fine-grain primitives. On the operational side, we give big-step semantics and a stack machine for CBPV, which leads to a straightforward push/pop reading of CBPV programs. On the denotational side, we model CBPV using cpos and, more generally, using algebras for a strong monad. For storage, we present an O’Hearn-style “behaviour semantics’’ that does not use a monad.We present the translations from CBN and CBV to CBPV. All these translations straightforwardly preserve denotational semantics. We also study their operational properties: simulation and full abstraction.We give an equational theory for CBPV, and show it equivalent to a categorical semantics using monads and algebras. We use this theory to formally compare CBPV to Filinski’s variant of the monadic metalanguage, as well as to Marz’s language SFPL, both of which have essentially the same type structure as CBPV. We also discuss less formally the differences between the CBPV and monadic frameworks.
computer science logic | 2007
Soren B. Lassen; Paul Blain Levy
Normal form bisimulation is a powerful theory of program equivalence, originally developed to characterize Levy-Longo tree equivalence and Boehm tree equivalence. It has been adapted to a range of un-typed, higher-order calculi, but types have presented a difficulty. In this paper, we present an account of normal form bisimulation for types, including recursive types. We develop our theory for a continuation-passing style calculus, Jump-With-Argument (JWA), where normal form bisimilarity takes a very simple form. We give a novel congruence proof, based on insights from game semantics. A notable feature is the seamless treatment of eta-expansion. We demonstrate the normal form bisimulation proof principle by using it to establish a syntactic minimal invariance result and the uniqueness of the fixed point operator at each type.
Electronic Notes in Theoretical Computer Science | 2011
Vasileios Koutavas; Paul Blain Levy; Eijiro Sumii
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.
Electronic Notes in Theoretical Computer Science | 2006
Paul Blain Levy
In this paper, we look at two categorical accounts of computational effects (strong monad as a model of the monadic metalanguage, adjunction as a model of call-by-push-value with stacks), and we adapt them to incorporate global exceptions. In each case, we extend the calculus with a construct, due to Benton and Kennedy, that fuses exception handling with sequencing. This immediately gives us an equational theory, simply by adapting the equations for sequencing. We study the categorical semantics of the two equational theories. In the case of the monadic metalanguage, we see that a monad supporting exceptions is a coalgebra for a certain comonad. We further show, using Becks theorem, that, on a category with equalizers, the monad constructor for exceptions gives all such monads. In the case of call-by-push-value (CBPV) with stacks, we generalize the notion of CBPV adjunction so that a stack awaiting a value can deal both with a value being returned, and with an exception being raised. We see how to obtain a model of exceptions from a CBPV adjunction, and vice versa by restricting to those stacks that are homomorphic with respect to exception raising.
Electronic Notes in Theoretical Computer Science | 2006
Paul Blain Levy
Abstract Howes 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 languages 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 Howes method, called “infinitary Howes 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 Howes 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.
logic in computer science | 2012
Jir ; x Ed; Ad'mek; Stefan Milius; Nathan Bowler; Paul Blain Levy
Coproducts of monads on Set have arisen in both the study of computational effects and universal algebra. We describe coproducts of consistent monads on Set by an initial algebra formula, and prove also the converse: if the coproduct exists, so do the required initial algebras. That formula was, in the case of ideal monads, also used by Ghani and Uustalu. We deduce that coproduct embeddings of consistent monads are injective; and that a coproduct of injective monad morphisms is injective. Two consistent monads have a coproduct iff either they have arbitrarily large common fixpoints, or one is an exception monad, possibly modified to preserve the empty set. Hence a consistent monad has a coproduct with every monad iff it is an exception monad, possibly modified to preserve the empty set. We also show other fixpoint results, including that a functor (not constant on nonempty sets) is finitary iff every sufficiently large cardinal is a fixpoint.