Continuation semantics and self-adjointness

Abstract We give an abstract categorical presentation of continuation semantics by taking the continuation type constructor ¬ (or cont in Standard ML of New Jersey) as primitive. This constructor on types extends to a contravariant functor on terms which is adjoint to itself on the left; restricted to the subcategory of those programs that do not manipulate the current continuation, it is adjoint to itself on the right. The motivating example of such a category is built from (equivalence classes of typing judgements for) continuation passing style (CPS) terms. A call-by-value λ-calculus with the control operator callcc as well as a call-by-name λ-calculus can be interpreted. Arrow types are broken down into continuation types for argument/result-continuations pairs. Specialising the semantics to the CPS term model allows a reconstruction of CPS transforms.

[1]  Gerald Jay Sussman,et al.  Lambda: The Ultimate Imperative , 1976 .

[2]  Edmund Robinson,et al.  Premonoidal categories and notions of computation , 1997, Mathematical Structures in Computer Science.

[3]  Martin Hofmann,et al.  Sound and complete axiomatisations of call-by-value control operators , 1995, Mathematical Structures in Computer Science.

[4]  Andrew W. Appel,et al.  Compiling with Continuations , 1991 .

[5]  Andrzej Filinski Declarative Continuations: an Investigation of Duality in Programming Language Semantics , 1989, Category Theory and Computer Science.

[6]  Davide Sangiorgi,et al.  Typing and subtyping for mobile processes , 1993, [1993] Proceedings Eighth Annual IEEE Symposium on Logic in Computer Science.

[7]  Robert Harper,et al.  Typing first-class continuations in ML , 1991, POPL '91.

[8]  Jr. Guy L. Steele,et al.  Rabbit: A Compiler for Scheme , 1978 .