4 research outputs found
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 Complete V-Equational System for Graded lambda-Calculus
Modern programming frequently requires generalised notions of program
equivalence based on a metric or a similar structure. Previous work addressed
this challenge by introducing the notion of a V-equation, i.e. an equation
labelled by an element of a quantale V, which covers inter alia (ultra-)metric,
classical, and fuzzy (in)equations. It also introduced a V-equational system
for the linear variant of lambda-calculus where any given resource must be used
exactly once.
In this paper we drop the (often too strict) linearity constraint by adding
graded modal types which allow multiple uses of a resource in a controlled
manner. We show that such a control, whilst providing more expressivity to the
programmer, also interacts more richly with V-equations than the linear or
Cartesian cases. Our main result is the introduction of a sound and complete
V-equational system for a lambda-calculus with graded modal types interpreted
by what we call a Lipschitz exponential comonad. We also show how to build such
comonads canonically via a universal construction, and use our results to
derive graded metric equational systems (and corresponding models) for programs
with timed and probabilistic behaviour
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