Arbitrary Functors as Modalities in a Linear Calculus
Abstract
We study modalities in the linear lambda calculus, by interpreting them as endofunctors in monoidal closed categories. We support functors that do not distribute over products, including (co)monads. We also support arbitrary natural transformations as conversion between modalities. We provide a generic categorical semantics, which we then specialise to a sound and complete resource semantics. We use this resource semantics to derive normalisation by evaluation. Along the way, we describe several applications of such models. This work aims at providing a foundation for future programming languages with modalities. The paper is backed by a mechanisation in Agda.
Create a lesson
Related papers
A Calculus for Borrowability
Shared title terminologycs.PLYanning Chen, Fan Long, Ningning Xie
CIRT: Calculus of Inductive Refinement Types
Shared title terminologycs.PLAlessio Ferrarini, Niki Vazou, G. A. Kavvos
CFGKAT: A Complete Calculus for Non-Local Control Flow
Shared title terminologycs.PLSpencer Van Koevering, Alexandra Silva, Cheng Zhang et al.
Context Types: Bunched Modalities for Unifying Safety and Reachability
Shared title terminologycs.PLZhe Zhou, Benjamin Delaware, Suresh Jagannathan
A Complete Calculus for Hamiltonian Quantum Programming
Shared title terminologycs.PLJacques Carette, Chris Heunen, Robin Kaarsgaard et al.
Grassmann: The Coordinate-Independent Linear Algebra Programming Language
Shared title terminologycs.PLTheadora Fields Collin, Gilbert Bernstein, Oded Stein et al.