A Core Quantitative Coeffect Calculus

Linear logic is well known for its resource-awareness, which has inspired the design of several resource management mechanisms in programming language design. Its resource-awareness arises from the distinction between linear, single-use data and non-linear, reusable data. The latter is marked by the so-called exponential modality, which, from the categorical viewpoint, is a monoidal comonad. Monadic notions of computation are well-established mechanisms used to express effects in pure functional languages. Less well-established is the notion of comonadic computation. However, recent works have shown the usefulness of comonads to structure context dependent computations. In this work, we present a language $\ell \mathcal{R}$ PCF inspired by a generalized interpretation of the exponential modality. In $\ell \mathcal{R}$ PCF the exponential modality carries a label--an element of a semiring $\mathcal{R}$ --that provides additional information on how a program uses its context. This additional structure is used to express comonadic type analysis.

[1]  Tarmo Uustalu,et al.  Signals and Comonads , 2005, J. Univers. Comput. Sci..

[2]  Nicolas Tabareau,et al.  Compiling functional types to relational specifications for low level imperative code , 2009, TLDI '09.

[3]  Pierre Jouvelot,et al.  The type and effect discipline , 1992, [1992] Proceedings of the Seventh Annual IEEE Symposium on Logic in Computer Science.

[4]  Ross Tate,et al.  The sequential semantics of producer effect systems , 2013, POPL.

[5]  Bertrand Guillou STRICTIFICATION OF CATEGORIES WEAKLY ENRICHED IN SYMMETRIC MONOIDAL CATEGORIES , 2009 .

[6]  Valeria C V de Paiva,et al.  Term Assignment for Intuitionistic Linear Logic , 1992 .

[7]  Philip Wadler,et al.  The marriage of effects and monads , 1998, ICFP '98.

[8]  Brian Campbell,et al.  Amortised Memory Analysis Using the Depth of Data Structures , 2009, ESOP.

[9]  Martin Hofmann,et al.  Realizability models for BLL-like languages , 2004, Theor. Comput. Sci..

[10]  Tarmo Uustalu,et al.  Comonadic Notions of Computation , 2008, CMCS.

[11]  Paul-André Melliès CATEGORICAL SEMANTICS OF LINEAR LOGIC , 2009 .

[12]  Jean-Louis Krivine,et al.  A call-by-name lambda-calculus machine , 2007, High. Order Symb. Comput..

[13]  Andre Scedrov,et al.  Bounded Linear Logic , 1991 .

[14]  Benjamin C. Pierce,et al.  Distance makes the types grow stronger: a calculus for differential privacy , 2010, ICFP '10.

[15]  Andrzej Filinski,et al.  Representing layered monads , 1999, POPL '99.

[16]  Philip Wadler,et al.  Linear logic, monads and the lambda calculus , 1996, Proceedings 11th Annual IEEE Symposium on Logic in Computer Science.

[17]  Nick Benton,et al.  A Term Calculus for Intuitionistic Linear Logic , 1993, TLCA.

[18]  Dan R. Ghica,et al.  Geometry of synthesis III: resource management through type inference , 2011, POPL '11.

[19]  Patrick Lincoln,et al.  Linear logic , 1992, SIGA.

[20]  A. Brunel,et al.  Quantitative classical realizability , 2012, Inf. Comput..

[21]  Andreas Haeberlen,et al.  Linear dependent types for differential privacy , 2013, POPL.

[22]  Andrew M. Pitts Step-Indexed Biorthogonality: a Tutorial Example , 2010, Modelling, Controlling and Reasoning About State.

[23]  Philip Wadler,et al.  The essence of functional programming , 1992, POPL '92.

[24]  Alan Mycroft,et al.  Coeffects: Unified Static Analysis of Context-Dependence , 2013, ICALP.

[25]  M. Laplaza,et al.  Coherence for distributivity , 1972 .

[26]  Robert Atkey,et al.  Parameterised notions of computation , 2006, J. Funct. Program..

[27]  Andre Scedrov,et al.  Bounded Linear Logic: A Modular Approach to Polynomial-Time Computability , 1992, Theor. Comput. Sci..

[28]  Dan R. Ghica,et al.  Bounded Linear Types in a Resource Semiring , 2014, ESOP.

[29]  M. Nivat Fiftieth volume of theoretical computer science , 1988 .

[30]  R. Stephenson A and V , 1962, The British journal of ophthalmology.

[31]  Ugo Dal Lago,et al.  Functional Programming in Sublinear Space , 2010, ESOP.

[32]  Martín Abadi,et al.  A core calculus of dependency , 1999, POPL '99.

[33]  Andreas Haeberlen,et al.  Sensitivity analysis using type-based constraints , 2013, FPCDSL '13.

[34]  Andrew Kennedy,et al.  Abstraction and invariance for algebraically indexed types , 2013, POPL.

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

[36]  Jon G. Riecke,et al.  The SLam calculus: programming with secrecy and integrity , 1998, POPL '98.

[37]  Dan R. Ghica,et al.  From bounded affine types to automatic timing analysis , 2013, ArXiv.

[38]  Sam Lindley,et al.  Extensional Rewriting with Sums , 2007, TLCA.

[39]  Flemming Nielson,et al.  Principles of Program Analysis , 1999, Springer Berlin Heidelberg.

[40]  Antoine Madet,et al.  Indexed Realizability for Bounded-Time Programming with References and Type Fixpoints , 2012, APLAS.

[41]  Dominic A. Orchard Programming contextual computations , 2014 .

[42]  Dale Miller,et al.  Algorithmic specifications in linear logic with subexponentials , 2009, PPDP '09.

[43]  Ugo Dal Lago,et al.  Linear Dependent Types and Relative Completeness , 2011, LICS.

[44]  Robin Milner,et al.  On Observing Nondeterminism and Concurrency , 1980, ICALP.

[45]  Giulio Manzonetto,et al.  Weighted Relational Models of Typed Lambda-Calculi , 2013, 2013 28th Annual ACM/IEEE Symposium on Logic in Computer Science.

[46]  Martin Hofmann,et al.  Bounded Linear Logic, Revisited , 2009, TLCA.

[47]  Martin Hofmann,et al.  Realizability models and implicit complexity , 2011, Theor. Comput. Sci..