Abstract
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.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Abadi, M., Banerjee, A., Heintze, N., Riecke, J.: A core calculus of dependency. In: POPL. ACM (1999)
Atkey, R.: Parameterised notions of computation. JFP 19(3-4) (2009)
Atkey, R., Johann, P., Kennedy, A.: Abstraction and invariance for algebraically indexed types. In: POPL. ACM (2013)
Benton, N., Bierman, G.M., Hyland, J.M.E., de Paiva, V.: Term assignment for intuitionistic linear logic. Technical Report 262, University of Cambridge (1992)
Benton, N., Tabareau, N.: Compiling functional types to relational specifications for low level imperative code. In: TLDI. ACM (2009)
Benton, N., Wadler, P.: Linear logic, monads and the lambda calculus. In: LICS. IEEE (1996)
Brunel, A.: Quantitative classical realizability. Inf. and Comp. (to appear, 2013)
Brunel, A., Madet, A.: Indexed realizability for bounded-time programming with references and type fixpoints. In: Jhala, R., Igarashi, A. (eds.) APLAS 2012. LNCS, vol. 7705, pp. 264–279. Springer, Heidelberg (2012)
Dal Lago, U., Gaboardi, M.: Linear dependent types and relative completeness. In: LICS. IEEE (2011)
Dal Lago, U., Hofmann, M.: Bounded linear logic, revisited. In: Curien, P.-L. (ed.) TLCA 2009. LNCS, vol. 5608, pp. 80–94. Springer, Heidelberg (2009)
Dal Lago, U., Hofmann, M.: Realizability models and implicit complexity. TCS 412(20) (2011)
D’Antoni, L., Gaboardi, M., Gallego Arias, E.J., Haeberlen, A., Pierce, B.: Sensitivity analysis using type-based constraints. In: FPCDSL. ACM (2013)
Filinski, A.: Representing layered monads. In: POPL. ACM (1999)
Gaboardi, M., Haeberlen, A., Hsu, J., Narayan, A., Pierce, B.C.: Linear dependent types for differential privacy. In: POPL. ACM (2013)
Ghica, D.R., Smith, A.: Geometry of synthesis III: Resource management through type inference. In: POPL. ACM (2011)
Ghica, D.R., Smith, A. I.: Bounded linear types in a resource semiring. In: Shao, Z. (ed.) ESOP 2014. LNCS, vol. 8410, pp. 331–350. Springer, Heidelberg (2014)
Girard, J.-Y.: Linear logic. TCS 50(1), 1–102 (1987)
Girard, J.-Y., Scedrov, A., Scott, P.: Bounded linear logic. TCS 97(1) (1992)
Guillou, B.: Strictification of categories weakly enriched in symmetric monoidal categories. Theory and Applications of Categories 24(20), 564–579 (2010)
Heintze, N., Riecke, J.G.: The SLam calculus: Programming with secrecy and integrity. In: POPL. ACM (1998)
Hofmann, M., Scott, P.J.: Realizability models for BLL-like languages. TCS 318(1-2) (2004)
Krivine, J.-L.: A call-by-name lambda-calculus machine. HOSC 20(3) (2007)
Dal Lago, U., Schöpp, U.: Functional programming in sublinear space. In: Gordon, A.D. (ed.) ESOP 2010. LNCS, vol. 6012, pp. 205–225. Springer, Heidelberg (2010)
Laird, J., Manzonetto, G., McCusker, G., Pagani, M.: Weighted relational models of typed lambda-calculi. In: LICS. IEEE (2013)
Laplaza, M.: Coherence for distributivity. Lecture Notes in Math. 281 (1972)
Melliès, P.-A.: Categorical semantics of linear logic. Panoramas et Syntheses (2009)
Melliès, P.-A.: Parametric monads and enriched adjunctions. Technical report (2012), http://www.pps.univ-paris-diderot.fr/~mellies/tensorial-logic/
Melliès, P.-A.: The parametric continuation monad. Mathematical Structures in Computer Science (to appear, 2014)
Moggi, E.: Computational lambda-calculus and monads. In: LICS. IEEE (1989)
Nielson, F., Nielson, H.R., Hankin, C.L.: Principles of Program Analysis. Springer (1999)
Nigam, V., Miller, D.: Algorithmic specifications in linear logic with subexponentials. In: PPDP. ACM (2009)
Orchard, D.: Programming contextual computations, Cambridge University (2013)
Petricek, T., Orchard, D., Mycroft, A.: Coeffects: Unified static analysis of context-dependence. In: Fomin, F.V., Freivalds, R., Kwiatkowska, M., Peleg, D. (eds.) ICALP 2013, Part II. LNCS, vol. 7966, pp. 385–397. Springer, Heidelberg (2013)
Pitts, A.M.: Step-indexed biorthogonality: a tutorial example, Dagstuhl (2010)
Reed, J., Pierce, B.C.: Distance makes the types grow stronger: A calculus for differential privacy. In: ICFP. ACM (2010)
Talpin, J.-P., Jouvelot, P.: The type and effect discipline. In: LICS. IEEE (1992)
Tate, R.: The sequential semantics of producer effect systems. In: POPL (2013)
Uustalu, T., Vene, V.: Signals and comonads. J. UCS 11(7) (2005)
Uustalu, T., Vene, V.: Comonadic notions of computation. ENTCS 203 (2008)
Wadler, P.: The essence of functional programming. In: POPL. ACM (1992)
Wadler, P.: The marriage of effects and monads. In: ICFP. ACM (1998)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Brunel, A., Gaboardi, M., Mazza, D., Zdancewic, S. (2014). A Core Quantitative Coeffect Calculus. In: Shao, Z. (eds) Programming Languages and Systems. ESOP 2014. Lecture Notes in Computer Science, vol 8410. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-54833-8_19
Download citation
DOI: https://doi.org/10.1007/978-3-642-54833-8_19
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-54832-1
Online ISBN: 978-3-642-54833-8
eBook Packages: Computer ScienceComputer Science (R0)