Results 1 
5 of
5
Modelling environments in callbyvalue programming languages
, 2003
"... 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 environmen ..."
Abstract

Cited by 14 (4 self)
 Add to MetaCart
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 callbyvalue 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 callbyvalue languages by analysing a finegrain 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.
Arrows, like monads, are monoids
 Proc. of 22nd Ann. Conf. on Mathematical Foundations of Programming Semantics, MFPS XXII, v. 158 of Electron. Notes in Theoret. Comput. Sci
, 2006
"... Monads are by now wellestablished as programming construct in functional languages. Recently, the notion of “Arrow ” was introduced by Hughes as an extension, not with one, but with two type parameters. At first, these Arrows may look somewhat arbitrary. Here we show that they are categorically fai ..."
Abstract

Cited by 12 (1 self)
 Add to MetaCart
Monads are by now wellestablished as programming construct in functional languages. Recently, the notion of “Arrow ” was introduced by Hughes as an extension, not with one, but with two type parameters. At first, these Arrows may look somewhat arbitrary. Here we show that they are categorically fairly civilised, by showing that they correspond to monoids in suitable subcategories of bifunctors C op ×C → C. This shows that, at a suitable level of abstraction, arrows are like monads — which are monoids in categories of functors C → C. Freyd categories have been introduced by Power and Robinson to model computational effects, well before Hughes ’ Arrows appeared. It is often claimed (informally) that Arrows are simply Freyd categories. We shall make this claim precise by showing how monoids in categories of bifunctors exactly correspond to Freyd categories.
Freyd is Kleisli, for arrows
 In C. McBride, T. Uustalu, Proc. of Wksh. on Mathematically Structured Programming, MSFP 2006, Electron. Wkshs. in Computing. BCS
, 2006
"... Arrows have been introduced in functional programming as generalisations of monads. They also generalise comonads. Fundamental structures associated with (co)monads are Kleisli categories and categories of (EilenbergMoore) algebras. Hence it makes sense to ask if there are analogous structures for ..."
Abstract

Cited by 4 (2 self)
 Add to MetaCart
Arrows have been introduced in functional programming as generalisations of monads. They also generalise comonads. Fundamental structures associated with (co)monads are Kleisli categories and categories of (EilenbergMoore) algebras. Hence it makes sense to ask if there are analogous structures for Arrows. In this short note we shall take first steps in this direction, and identify for instance the Freyd
Axiomatics for Data Refinement in Call By Value Programming Languages
"... We give a systematic category theoretic axiomatics for modelling data refinement in call by value programming languages. Our leading examples of call by value languages are extensions of the computational calculus, such as FPC and languages for modelling nondeterminism, and extensions of the first ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
We give a systematic category theoretic axiomatics for modelling data refinement in call by value programming languages. Our leading examples of call by value languages are extensions of the computational calculus, such as FPC and languages for modelling nondeterminism, and extensions of the first order fragment of the computational calculus, such as a CPS language. We give a category theoretic account of the basic setting, then show how to model contexts, then arbitrary type and term constructors, then signatures, and finally data refinement. This extends and clarifies Kinoshita and Power's work on lax logical relations for call by value languages.
On the Semantics of Parsing Actions
"... Parsers, whether constructed by hand or automatically via a parser generator tool, typically need to compute some useful semantic information in addition to the purely syntactic analysis of their input. Semantic actions may be added to parsing code by hand, or the parser generator may have its own s ..."
Abstract
 Add to MetaCart
Parsers, whether constructed by hand or automatically via a parser generator tool, typically need to compute some useful semantic information in addition to the purely syntactic analysis of their input. Semantic actions may be added to parsing code by hand, or the parser generator may have its own syntax for annotating grammar rules with semantic actions. In this paper, we take a functional programming view of such actions. We use concepts from the semantics of mostly functional programming languages and adapt them to give meaning to the actions of the parser. Specifically, the semantics is inspired by the categorical semantics of lambda calculi and the use of premonoidal categories for the semantics of effects in programming languages. This framework is then applied to our leading example, the transformation of grammars to eliminate left recursion. The syntactic transformation of leftrecursion elimination leads to a corresponding semantic transformation of the actions for the grammar. We prove the semantic transformation correct and relate it to continuation passing style, a widely studied transformation in lambda calculi and functional programming. As an idealization of the input language of parser generators, we define a callbyvalue calculus with firstorder functions and a typeandeffect system where the effects are given by sequences of grammar symbols. The account of leftrecursion elimination is then extended to this calculus.