A Complete V-Equational System for Graded lambda-Calculus

04/04/2023
by   Fredrik Dahlqvist, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/30/2022

The syntactic side of autonomous categories enriched over generalised metric spaces

Programs with a continuous state space or that interact with physical pr...
research
05/18/2021

An Internal Language for Categories Enriched over Generalised Metric Spaces

Programs with a continuous state space or that interact with physical pr...
research
06/24/2021

Resource Transition Systems and Full Abstraction for Linear Higher-Order Effectful Systems

We investigate program equivalence for linear higher-order(sequential) l...
research
02/10/2023

On the Lattice of Program Metrics

In this paper we are concerned with understanding the nature of program ...
research
10/14/2021

First-Order Modal ξ-Calculus

This paper proposes first-order modal ξ-calculus as well as genealogical...
research
08/05/2022

Covariant-Contravariant Refinement Modal μ-calculus

The notion of covariant-contravariant refinement (CC-refinement, for sho...
research
09/13/2023

Using Pi-Calculus Names as Locks

Locks are a classic data structure for concurrent programming. We introd...

Please sign up or login with your details

Forgot password? Click here to reset