6 research outputs found
Modelling Coeffects in the Relational Semantics of Linear Logic
Various typing system have been recently introduced giving a parametric version of the exponential modality of linear logic. The parameters are taken from a semi-ring, and allow to express coeffects - i.e. specific requirements of a program with respect to the environment (availability of a resource, some prerequisite of the input, etc.).
We show that all these systems can be interpreted in the relational category (Rel) of sets and relations. This is possible because of the notion of multiplicity semi-ring and allowing a great variety of exponential comonads in Rel. The interpretation of a particular typing system corresponds then to give a suitable notion of stratification of the exponential comonad associated with the semi-ring parametrising the exponential modality
Graded Differential Categories and Graded Differential Linear Logic
In Linear Logic (), the exponential modality brings forth a
distinction between non-linear proofs and linear proofs, where linear means
using an argument exactly once. Differential Linear Logic () is
an extension of Linear Logic which includes additional rules for which
encode differentiation and the ability of linearizing proofs. On the other
hand, Graded Linear Logic () is a variation of Linear Logic in
such a way that is now indexed over a semiring . This -grading allows
for non-linear proofs of degree , such that the linear proofs are of
degree . There has been recent interest in combining these two
variations of together and developing Graded Differential Linear
Logic (). In this paper we present a sequent calculus for
, as well as introduce its categorical semantics, which we call
graded differential categories, using both coderelictions and deriving
transformations. We prove that symmetric powers always give graded differential
categories, and provide other examples of graded differential categories. We
also discuss graded versions of (monoidal) coalgebra modalities, additive
bialgebra modalities, and the Seely isomorphisms, as well as their
implementations in the sequent calculus of .Comment: In the proceedings of MFPS2023 (appendix included
A relational theory of effects and coeffects
International audienceGraded modal types systems and coeffects are becoming a standard formalism to deal with context-dependent, usage-sensitive computations, especially when combined with computational effects. From a semantic perspective, effectful and coeffectful languages have been studied mostly by means of denotational semantics and almost nothing has been done from the point of view of relational reasoning. This gap in the literature is quite surprising, since many cornerstone results — such as non-interference , metric preservation , and proof irrelevance — on concrete coeffects are inherently relational. In this paper, we fill this gap by developing a general theory and calculus of program relations for higher-order languages with combined effects and coeffects. The relational calculus builds upon the novel notion of a corelator (or comonadic lax extension ) to handle coeffects relationally. Inside such a calculus, we define three notions of effectful and coeffectful program refinements: contextual approximation , logical preorder , and applicative similarity . These are the first operationally-based notions of program refinement (and, consequently, equivalence) for languages with combined effects and coeffects appearing in the literature. We show that the axiomatics of a corelator (together with the one of a relator) is precisely what is needed to prove all the aforementioned program refinements to be precongruences, this way obtaining compositional relational techniques for reasoning about combined effects and coeffects
Quantitative program reasoning with graded modal types
In programming, data is often considered to be infinitely copiable, arbitrarily discardable, and universally unconstrained. However this view is naive: some data encapsulates resources that are subject to protocols (e.g., file and device handles, channels); some data should not be arbitrarily copied or communicated (e.g., private data). Linear types provide a partial remedy by delineating data in two camps: "resources" to be used but never copied or discarded, and unconstrained values. However, this binary distinction is too coarse-grained. Instead, we propose the general notion of graded modal types, which in combination with linear and indexed types, provides an expressive type theory for enforcing fine-grained resource-like properties of data. We present a type system drawing together these aspects (linear, graded, and indexed) embodied in a fully-fledged functional language implementation, called Granule. We detail the type system, including its metatheoretic properties, and explore examples in the concrete language. This work advances the wider goal of expanding the reach of type systems to capture and verify a broader set of program properties