What is a categorical model of the differential and the resource λ-calculi?

GIULIO MANZONETTO
2012 Mathematical Structures in Computer Science  
The differential λ-calculus is a paradigmatic functional programming language endowed with a syntactical differentiation operator that allows to apply a program to an argument in a linear way. One of the main features of this language is that it is resource conscious and gives the programmer suitable primitives to handle explicitly the resources used by a program during its execution. The differential operator also allows to write the full Taylor expansion of a program. Through this expansion
more » ... ery program can be decomposed into an infinite sum (representing non-deterministic choice) of 'simpler' programs that are strictly linear. The aim of this paper is to develop an abstract 'model theory' for the untyped differential λ-calculus. In particular, we investigate what should be a general categorical definition of denotational model for this calculus. Starting from the work of Blute, Cockett and Seely on differential categories we provide the notion of Cartesian closed differential category and we prove that linear reflexive objects living in such categories constitute sound and complete models of the untyped differential λ-calculus. We also give sufficient conditions for Cartesian closed differential categories to model the Taylor expansion. This entails that every model living in such categories equates all programs having the same full Taylor expansion. We then provide a concrete example of a Cartesian closed differential category modeling the Taylor expansion, namely the category MRel of sets and relations from finite multisets to sets. We prove that the extensional model D of λ-calculus we have recently built in MRel is linear, and therefore it is also an extensional model of the untyped differential λ-calculus. In the same category we build a non-extensional model E and we prove that it is however extensional on its differential part. Finally, we study the relationship between the differential λ-calculus and the resource calculus, a functional programming language combining the ideas behind the differential λ-calculus with those behind Boudol's λ-calculus with multiplicities. We define two translation maps between these two calculi and we study the properties of these translations. In particular, from this analysis it follows that the two calculi share the same notion of model. Therefore the resource calculus can be interpreted by translation into every linear reflexive object living in a Cartesian closed differential category.
doi:10.1017/s0960129511000594 fatcat:oahkwj3ihndovlixd4tp5yflg4