## Environments, Continuation Semantics and Indexed Categories (1997)

Venue: | Theoretical Aspects of Computer Software, number 1281 in Lect. Notes Comp. Sci |

Citations: | 6 - 2 self |

### BibTeX

@INPROCEEDINGS{Power97environments,continuation,

author = {John Power and Hayo Thielecke},

title = {Environments, Continuation Semantics and Indexed Categories},

booktitle = {Theoretical Aspects of Computer Software, number 1281 in Lect. Notes Comp. Sci},

year = {1997},

pages = {391--414},

publisher = {Springer-Verlag}

}

### Years of Citing Articles

### OpenURL

### Abstract

. There have traditionally been two approaches to modelling environments, one by use of ønite products in Cartesian closed categories, the other by use of the base categories of indexed categories with structure. Recently, there have been more general deønitions along both of these lines: the ørst generalising from Cartesian to symmetric premonoidal categories, the second generalising from indexed categories with speciøed structure to -categories. The added generality is not of the purely mathematical kind; in fact it is necessary to extend semantics from the logical calculi studied in, say, Type Theory to more realistic programming language fragments. In this paper, we establish an equivalence between these two recent notions. We then use that equivalence to study semantics for continuations. We give three category theoretic semantics for modelling continuations and show the relationships between them. The ørst is given by a continuations monad. The second is based on a symmetric prem...

### Citations

762 | Notions of Computation and Monads
- Moggi
- 1991
(Show Context)
Citation Context ... strictly: of course, a monoidal category such as C is trivially a premonoidal category. That construction is fundamental, albeit implicit, in Eugenio Moggi's work on monads as notions of computation =-=[10], as exp-=-lained in [16]. De��nition 5. Given a premonoidal category K, de��ne the centre of K, denoted Z(K), to be the subcategory of K consisting of all the objects of K and the central morphisms. For... |

337 |
An algorithmic interpretation of classical natural deduction
- Parigot
- 1992
(Show Context)
Citation Context ...mputer science, and we use it for that purpose in our third approach to continuation semantics. Ong [11] also uses a ��bration to model environments for his categorical formulation of the ��-c=-=alculus [14]. As-=- this calculus is an extension of the call-bynames-calculus, Ong can assume every ��bre to be Cartesian closed. However, for call-by-value programming languages like ML or Scheme, one cannot assum... |

102 | Premonoidal categories and notions of computation - Power, Robinson - 1997 |

72 | Categorical Structure of Continuation Passing Style
- Thielecke
- 1997
(Show Context)
Citation Context ...re corresponds to the idea that for each type �� , there is a continuation type :�� that can accept an input of type �� . The third, which we introduce here, is also being developed by Hay=-=o Thielecke [20]. It-=- is based on a -category with added structure, and one again adds a self-adjoint construction. The ��rst of these models is less general than the other two, which are essentially equivalent. While... |

66 | The π-calculus in direct style
- Boudol
- 1998
(Show Context)
Citation Context ... this approach runs into conceptual and mathematical diOEculties when trying to address the question what the elusive answer type could be [9]. In the light of work on CPS in the ��-calculus, such=-= as [2]-=-, the answer type seems to be a red herring, in that one can have continuations without an answer type. The more recent approaches to modelling continuations in category theoretic terms do not have an... |

59 |
Categories of partial maps
- Robinson, Rosolini
- 1988
(Show Context)
Citation Context ...ply typed -calculus, environments have been modelled by ��nite products. More recently, monoidal structure has sometimes been used, for instance when one wants to incorporate an account of partial=-=ity [17]-=-. In the presence of stronger computational eoeects, an even weaker notion is required. If the computational eoeects are strong enough for the order of evaluation of f : A \Gamma! B and f 0 : A 0 \Gam... |

44 |
Categorical type theory
- Jacobs
- 1991
(Show Context)
Citation Context ...lling environments categorically, also used to model the simply typed -calculus, is based on indexed categories with structure, and has been heavily advocated, although not introduced, by Bart Jacobs =-=[8]: th-=-e slogan is that contexts, which we call environments, are indices for the categories in which the terms de��nable in that context are modelled. Here, a program phrase in environment \Gamma is mod... |

40 |
Declarative continuations: an investigation of duality in programming language semantics (lecture notes in computer science 389
- Filinski
- 1989
(Show Context)
Citation Context ...ncorporate continuations into denotational semantics by means of category theoretic structure. The ��rst has been studied extensively by several people, for instance in Andrzej Filinski's thesis (=-=see [5]). It is-=- based on a monad for continuations: one has a type Ans of answers, and the semantics of a program from �� to oe is given by a function from J��K to the double exponential (JoeK ! Ans) ! Ans. ... |

31 | A semantic view of classical proofs: Type-theoretic, categorical, and denotational characterizations
- Ong
- 1996
(Show Context)
Citation Context ... believe this to be relevant not only to type theory but also to the modelling of environments in computer science, and we use it for that purpose in our third approach to continuation semantics. Ong =-=[11] also uses a-=- ��bration to model environments for his categorical formulation of the ��-calculus [14]. As this calculus is an extension of the call-bynames-calculus, Ong can assume every ��bre to be Ca... |

23 |
The Reasoned Schemer
- Friedman, Byrd, et al.
- 2005
(Show Context)
Citation Context ...ding an operational semantics. As an example of the use of expression continuations in programming, we consider the function rember-upto-last from the recent programming textbook The Seasoned Schemer =-=[4]-=-: The function rember-upto-last takes an atom a and a lat [list of atoms] and removes all the atoms from the lat up to and including the last occurrence of a. If there are no occurrences of a, rember-... |

22 |
Thunks: a way of compiling procedure statements with some comments on procedure declarations
- Ingerman
- 1961
(Show Context)
Citation Context ...thunk. fun thunk a = callcc(fn k =? throw (force k) a); thunk : '1a -? '1a cont cont; To explain the computational meaning of the self-adjoint structure, we recall the notions of thunking and forcing =-=[13]-=-. In the present setting, we consider a thunk to be something that expects a continuation to which it is to pass its argument. force passes the current continuation to its argument; thus, in force(thu... |

17 |
Premonoidal categories as categories with algebraic structure
- Power
- 2000
(Show Context)
Citation Context ...ory with ��nite products C and an identity on objects strict symmetric premonoidal functor J : C \Gamma! K. At ��rst sight, that may seem a somewhat complex structure, but in fact, as made pre=-=cise in [15]-=-, it is particularly natural category theoretic structure, more so than that of premonoidal structure alone, as it is algebraic structure. In our semantics for environments, just as in the monads as n... |

9 | Decomposing typed lambda calculus into a couple of categorical programming languages, in Category theory and computer science
- Hasegawa
- 1995
(Show Context)
Citation Context ...row from 1 to J��K in the ��bre of the indexed category over J\Gamma K. We consider a weak version of indexed category with structure, called a -category, implicit in recent work by Masahito H=-=asegawa [7]. In-=- the setting of indexed categories, various binding constructs can be studied. A -category has a weak ��rst order notion of binding, given by the assertion that reindexing along projections has a ... |

7 |
Typing rst-class continuations in ML
- Duba, Harper, et al.
- 1991
(Show Context)
Citation Context ...ont : ('1a -? '1b) -? ('1a * '1b cont) cont; 5 Continuation semantics and monads The canonical way of giving continuation semantics is by a CPS transform. We recall here a variant of the transform in =-=[3]-=-. [12] JxK = k:kx Jx:MK = k:k \Gamma xh:JMKh \Delta Jthrow M NK = k:JMKJNK Jcallcc MK = k:JMK(f:fkk) JMNK = k: \Gamma JMK(m:JNK(n:mnk)) \Delta The CPS transform can be read as a semantics in the style... |

7 |
Three monads for continuations
- Kieburtz, Agapiev, et al.
- 1992
(Show Context)
Citation Context ...utj of the transform in a Cartesian closed category. However, this approach runs into conceptual and mathematical diOEculties when trying to address the question what the elusive answer type could be =-=[9]. In-=- the light of work on CPS in the ��-calculus, such as [2], the answer type seems to be a red herring, in that one can have continuations without an answer type. The more recent approaches to model... |

7 | Continuation semantics and self-adjointness
- Thielecke
- 1997
(Show Context)
Citation Context ...at in the presence of ��rst-class continuations the whole of the centre admits ��nite products. This is becasue the self-adjoint structure allows every central morphism to be rei��ed, as e=-=xplained in [19]-=-. 9 Conclusions We have shown how to account for environments in languages with a more computational AEavour than the pure -calculus by generalising two semantics for environments and showing them ess... |

3 | Continuation passing style and self adjointness
- Thielecke
- 1997
(Show Context)
Citation Context ...cs. Assuming ��nite products to exist in the centre of the semantic category (to be de��ned) overcomes the diOEculty that the subcategory of itotalj maps in the sense of [5] is demonstrably to=-=o large [18,19]-=- to admit products. Bart Jacobs' thesis [8] championed the view of contexts as iindices for the terms and types derivable in that context.j We believe this to be relevant not only to type theory but a... |

1 |
Categories for computation in context and uni��ed logic (submitted
- Blute, Cockett, et al.
(Show Context)
Citation Context ...lence, between\Omega\Gamma -categories and indexed :-categories. Related Work The relationship between symmetric premonoidal categories and -categories is related to work by Blute, Cockett, and Seely =-=[1]-=-. Implicit in their work is the construction which, to a symmetric premonoidal category with a little added structure, assigns a -category. The latter are closely related to their context categories. ... |