Control categories and duality: on the categorical semantics of the lambda-mu calculus

We give a categorical semantics to the call-by-name and call-by-value versions of Parigot's λμ-calculus with disjunction types. We introduce the class of control categories, which combine a cartesian-closed structure with a premonoidal structure in the sense of Power and Robinson. We prove, via a categorical structure theorem, that the categorical semantics is equivalent to a CPS semantics in the style of Hofmann and Streicher. We show that the call-by-name λμ-calculus forms an internal language for control categories, and that the call-by-value λμ-calculus forms an internal language for the dual co-control categories. As a corollary, we obtain a syntactic duality result: there exist syntactic translations between call-by-name and call-by-value that are mutually inverse and preserve the operational semantics. This answers a question of Streicher and Reus.

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

[2]  Peter Selinger An Implementation of the Call-By-Name -Calculus , 1998 .

[3]  David J. Pym,et al.  On the semantics of classical disjunction , 2001 .

[4]  Thomas Streicher,et al.  Classical logic, continuation semantics and abstract machines , 1998, Journal of Functional Programming.

[5]  Michel Parigot,et al.  Lambda-Mu-Calculus: An Algorithmic Interpretation of Classical Natural Deduction , 1992, LPAR.

[6]  A. Pitts INTRODUCTION TO HIGHER ORDER CATEGORICAL LOGIC (Cambridge Studies in Advanced Mathematics 7) , 1987 .

[7]  Saunders MacLane,et al.  Natural Associativity and Commutativity , 1963 .

[8]  J. Lambek,et al.  Introduction to higher order categorical logic , 1986 .

[9]  Eugenio Moggi,et al.  Computational lambda-calculus and monads , 1989, [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science.

[10]  Philippe de Groote,et al.  On the Relation between the Lambda-Mu-Calculus and the Syntactic Theory of Sequential Control , 1994, LPAR.

[11]  C.-H. Luke Ong,et al.  A semantic view of classical proofs: type-theoretic, categorical, and denotational characterizations , 1996, Proceedings 11th Annual IEEE Symposium on Logic in Computer Science.

[12]  Timothy G. Griffin,et al.  A formulae-as-type notion of control , 1989, POPL '90.

[13]  Gordon D. Plotkin,et al.  Call-by-Name, Call-by-Value and the lambda-Calculus , 1975, Theor. Comput. Sci..

[14]  G. M. Kelly,et al.  On MacLane's conditions for coherence of natural associativities, commutativities, etc. , 1964 .

[15]  Martin Hofmann,et al.  Continuation models are universal for lambda-mu-calculus , 1997, LICS 1997.

[16]  Matthias Felleisen,et al.  The calculi of lambda-nu-cs conversion: a syntactic theory of control and state in imperative higher-order programming languages , 1987 .

[17]  Hayo Thielecke,et al.  Categorical Structure of Continuation Passing Style , 1997 .

[18]  C.-H. Luke Ong,et al.  A Curry-Howard foundation for functional computation with control , 1997, POPL '97.

[19]  Robert Hieb,et al.  The Revised Report on the Syntactic Theories of Sequential Control and State , 1992, Theor. Comput. Sci..

[20]  Philippe de Groote,et al.  A CPS-Translation of the Lambda-µ-Calculus , 1994, CAAP.

[21]  Carsten Führmann,et al.  Direct Models for the Computational Lambda Calculus , 1999, MFPS.

[22]  Thomas Streicher,et al.  Continuation Models Are Universal for -calculus , 1997 .

[23]  Alan Jeffrey,et al.  Premonoidal categories and flow graphs , 1997, HOOTS.