Linearly-Used Continuations in the Enriched Effect Calculus
The enriched effect calculus is an extension of Moggi’s computational metalanguage with a selection of primitives from linear logic. In this paper, we present an extended case study within the enriched effect calculus: the linear usage of continuations. We show that established call-by-value and call-by name linearly-used CPS translations are uniformly captured by a single generic translation of the enriched effect calculus into itself. As a main syntactic theorem, we prove that the generic translation is involutive up to isomorphism. As corollaries, we obtain full completeness results for the original call-by-value and call-by-name translations. The main syntactic theorem is proved using a category-theoretic semantics for the enriched effect calculus. We show that models are closed under a natural dual model construction. The canonical linearly-used CPS translation then arises as the unique (up to isomorphism) map from the syntactic initial model to its own dual. This map is an equivalence of models. Thus the initial model is self-dual.
KeywordsPointed Model Computation Type Linear Logic Typing Rule Left Adjoint
- 1.Barr, M.: ∗-autonomous categories. 752, vol. LNM (1979)Google Scholar
- 5.A.: Filinski. Controlling Effects. PhD thesis, School of Comp. Sci., CMU (1996)Google Scholar
- 7.Hasegawa, M.: Semantics of linear continuation-passing in call-by-name. In: Kameyama, Y., Stuckey, P.J. (eds.) FLOPS 2004. LNCS, vol. 2998, pp. 229–243. Springer, Heidelberg (2004)Google Scholar
- 10.Levy, P.B.: Call-by-push-value. In: A functional/imperative synthesis. Semantic Structures in Computation. Springer, Heidelberg (2004)Google Scholar
- 11.Moggi, E.: Computational lambda-calculus and monads. In: Proc. 4th LICS, pp. 14–23 (1989)Google Scholar