Hostname: page-component-78c5997874-lj6df Total loading time: 0 Render date: 2024-11-12T13:33:04.937Z Has data issue: false hasContentIssue false

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

Published online by Cambridge University Press:  27 February 2012

GIULIO MANZONETTO*
Affiliation:
Univ. Paris 13, Sorbonne Paris Cité, LIPN, UMR 7030, CNRS, F-93430 Villetaneuse, France Email: giulio.manzonetto@lipn.univ-paris13.fr

Abstract

The differential λ-calculus is a paradigmatic functional programming language endowed with a syntactical differentiation operator that allows the application of 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 us to write the full Taylor expansion of a program. Through this expansion, every 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 form a general categorical definition of a denotational model for this calculus should take. Starting from the work of Blute, Cockett and Seely on differential categories, we develop the notion of a Cartesian closed differential category and 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 requires 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 modelling the Taylor expansion, namely the category MRel of sets and relations from finite multisets to sets. We prove that the extensional model of λ-calculus we have recently built in MRel is linear, and is thus also an extensional model of the untyped differential λ-calculus. In the same category, we build a non-extensional model and prove that it is, nevertheless, extensional on its differential part.

Finally, we study the relationship between the differential λ-calculus and the resource calculus, which is 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 study the properties of these translations. In particular, this analysis shows that the two calculi share the same notion of a model, and thus that the resource calculus can be interpreted by translation into every linear reflexive object living in a Cartesian closed differential category.

Type
Paper
Copyright
Copyright © Cambridge University Press 2012

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Asperti, A. and Longo, G. (1991) Categories, types and structures. Category theory for the working computer scientist, M.I.T. Press.Google Scholar
Barendregt, H. P. (1984) The Lambda calculus: Its syntax and semantics, North-Holland.Google Scholar
Berry, G. (1978) Stable models of typed lambda-calculi. In: Ausiello, G. and Böhm, C. (eds.) ICALP. Springer-Verlag Lecture Notes in Computer Science 62 7289.Google Scholar
Blute, R. F., Cockett, J. R. B. and Seely, R. A. G. (2006) Differential categories. Mathematical Structures in Computer Science 16 (6)10491083.CrossRefGoogle Scholar
Blute, R. F., Cockett, J. R. B. and Seely, R. A. G. (2009) Cartesian differential categories. Theory and Applications of Categories 22 (23)622672.Google Scholar
Boudol, G. (1993) The lambda-calculus with multiplicities. In: CONCUR'93 1–6.Google Scholar
Boudol, G., Curien, P.-L. and Lavatelli, C. (1999) A semantics for lambda calculi with resources. Mathematical Structures in Computer Science 9 (4)437482.Google Scholar
Bucciarelli, A., Carraro, A., Ehrhard, T. and Manzonetto, G. (2011) Full abstraction for resource calculus with tests. In: Bezem, M. (ed.) Computer Science Logic (CSL'11) – 25th International Workshop/20th Annual Conference of the EACSL. Leibniz International Proceedings in Informatics (LIPIcs) 12, Schloss Dagstuhl–Leibniz-Zentrum für Informatik 97–111.Google Scholar
Bucciarelli, A. and Ehrhard, T. (1991) Sequentiality and strong stability. In: Sixth Annual IEEE Symposium on Logic in Computer Science, IEEE Computer Society Press 138145.Google Scholar
Bucciarelli, A., Ehrhard, T. and Manzonetto, G. (2007) Not enough points is enough. In: Proc. of Comp. Sci. Logic 2007. Springer-Verlag Lecture Notes in Computer Science 4646 298312.Google Scholar
Bucciarelli, A., Ehrhard, T. and Manzonetto, G. (2009) A relational model of a parallel and non-deterministic lambda-calculus. In: International Symposium on Logical Foundations of Computer Science (LFCS 2009). Springer-Verlag Lecture Notes in Computer Science 5407 107121.Google Scholar
Bucciarelli, A., Ehrhard, T. and Manzonetto, G. (2010) Categorical models for simply typed resource calculi. Electronic Notes in Theoretical Computer Science 265 213230.CrossRefGoogle Scholar
Carraro, A., Ehrhard, T. and Salibra, A. (2010) Exponentials with infinite multiplicities. In: Computer Science Logic 2010. Springer-Verlag Lecture Notes in Computer Science 6247 170184.Google Scholar
Carraro, A., Ehrhard, T. and Salibra, A. (2010) Resource combinatory algebras. In: Mathematical Foundations of Computer Science 2010. Springer-Verlag Lecture Notes in Computer Science 6281 233245.CrossRefGoogle Scholar
Church, A. (1932) A set of postulates for the foundation of logic. Annals of Mathematics 33 346366.CrossRefGoogle Scholar
Church, A. (1941) The Calculi of Lambda-Conversion, Princeton University Press.Google Scholar
de Carvalho, D. (2007) Sémantiques de la logique linéaire et temps de calcul, Ph.D. thesis, Université de la Méditerranée, Aix-Marseille II.Google Scholar
Dezani-Ciancaglini, M., de'Liguoro, U. and Piperno, A. (1996) Filter models for conjunctive–disjunctive lambda-calculi. Theoretical Computer Science 170 (1–2)83128.Google Scholar
Ehrhard, T. (2005) Finiteness spaces. Mathematical Structures in Computer Science 15 (4)615646.Google Scholar
Ehrhard, T. (2009) The Scott model of linear logic is the extensional collapse of its relational model.Google Scholar
Ehrhard, T. and Regnier, L. (2003) The differential lambda-calculus. Theoretical Computer Science 309 (1–3)141.Google Scholar
Ehrhard, T. and Regnier, L. (2006a) Böhm trees, Krivine's machine and the Taylor expansion of lambda-terms. In: CiE. Springer-Verlag Lecture Notes in Computer Science 3988 186197.CrossRefGoogle Scholar
Ehrhard, T. and Regnier, L. (2006b) Differential interaction nets. Theoretical Computer Science 364 (2)166195.Google Scholar
Ehrhard, T. and Regnier, L. (2008) Uniformity and the Taylor expansion of ordinary lambda-terms. Theoretical Computer Science 403 (2–3)347372.Google Scholar
Engeler, E. (1981) Algebras and combinators. Algebra Universalis 13 (3)389392.CrossRefGoogle Scholar
Girard, J.-Y. (1988) Normal functors, power series and λ-calculus. Annals of Pure and Applied Logic 37 (2)129177.Google Scholar
Harmer, R. and McCusker, G. (1999) A fully abstract game semantics for finite nondeterminism. In: Proceedings, Fourteenth Annual IEEE Symposium on Logic in Computer Science, IEEE Computer Society Press 422430.Google Scholar
Hyland, J. M. E., Nagayama, M., Power, J. and Rosolini, G. (2006) A category theoretic formulation for Engeler-style models of the untyped λ-calculus. Electronic Notes in Theoretical Computer Science 161 4357.Google Scholar
Karoubi, M. (1978) K-theory, Springer-Verlag.Google Scholar
Koymans, C. P. J. (1982) Models of the lambda calculus. Information and Control 52 (3)306332.Google Scholar
Laird, J., Manzonetto, G. and McCusker, G. (2011) Constructing differential categories and deconstructing categories of games. In: Aceto, L., Henzinger, M. and Sgall, J. (eds.) ICALP (2). Springer-Verlag Lecture Notes in Computer Science 6756 186197.CrossRefGoogle Scholar
Lusin, S. and Salibra, A. (2004) The lattice of lambda theories. Journal of Logic and Computation 14 373394.Google Scholar
Manzonetto, G. (2009) A general class of models of . In: Mathematical Foundations of Computer Science 2009 (MFCS'09). Springer-Verlag Lecture Notes in Computer Science 5734 574586.Google Scholar
Manzonetto, G. and Pagani, M. (2011) Böhm theorem for resource lambda calculus through Taylor expansion. In: Typed Lambda Calculi and Applications (TLCA'11). Springer-Verlag Lecture Notes in Computer Science 6690 153168.Google Scholar
Manzonetto, G. and Salibra, A. (2010) Applying universal algebra to lambda calculus. Journal of Logic and Computation 20 (4)877915.Google Scholar
Martini, S. (1992) Categorical models for non-extensional λ-calculi and combinatory logic. Mathematical Structures in Computer Science 2 (3)327357.CrossRefGoogle Scholar
Melliès, P.-A., Tabareau, N. and Tasson, C. (2009) An explicit formula for the free exponential modality of linear logic. In: Albers, S., Marchetti-Spaccamela, A., Matias, Y., Nikoletseas, S. and Thomas, W. (eds.) Automata, Languages and Programming. Springer-Verlag Lecture Notes in Computer Science 5556 247260.Google Scholar
Pagani, M. and Ronchi Della Rocca, S. (2010) Solvability in resource lambda-calculus. In: Foundations of Software Science and Computational Structures (FOSSACS'10). Springer-Verlag Lecture Notes in Computer Science 6014 358373.Google Scholar
Pagani, M. and Tranquilli, P. (2009) Parallel reduction in resource λ-calculus. In: APLAS. Springer-Verlag Lecture Notes in Computer Science 5904 226242.Google Scholar
Salibra, A. (2000) On the algebraic models of lambda calculus. Theoretical Computer Science 249 197240.Google Scholar
Salibra, A. (2001) A continuum of theories of lambda calculus without semantics. In: 16th Annual IEEE Symposium on Logic in Computer Science, IEEE Computer Society Press 334343.Google Scholar
Scott, D. (1980) Relating theories of the lambda-calculus. In: Hindley, J. R. and Seldin, J. P. (eds.) Essays on Combinatory Logic, Lambda-Calculus, and Formalism, Academic Press 589606.Google Scholar
Scott, D. S. (1972) Continuous lattices. In: Toposes, algebraic geometry and logic, Springer-Verlag.Google Scholar
Tranquilli, P. (2009) Nets between determinism and nondeterminism, Ph.D. thesis, Univ. of Paris 7 and Univ. of Roma 3.Google Scholar
Vaux, L. (2007a) The differential λμ-calculus. Theoretical Computer Science 379 (1–2)166209.CrossRefGoogle Scholar
Vaux, L. (2007b) λ-calcul différentiel et logique classique: interactions calculatoires, Ph.D. thesis, Univ. de la Méditerranée.Google Scholar
Vaux, L. (2009) Primitive recursion in finiteness spaces. Technical report, Laboratoire de Mathématiques de l'Université de Savoie.Google Scholar