Coeffects for Sharing and Mutation
Riccardo Bianchini, Francesco Dagnino, Paola Giannini, Elena, Zucca, Marco Servetto

TL;DR
This paper introduces a coeffect-based type system to model sharing, uniqueness, and immutability in imperative programming, enabling precise tracking of variable interactions and usage effects.
Contribution
It extends coeffect systems to handle non-structural sharing in imperative paradigms, allowing for simple expression and verification of complex features like uniqueness.
Findings
Successfully models sharing, uniqueness, and immutability.
Proves properties of the enhanced type system.
Demonstrates effectiveness in imperative programming contexts.
Abstract
In type-and-coeffect systems, contexts are enriched by coeffects modeling how they are actually used, typically through annotations on single variables. Coeffects are computed bottom-up, combining, for each term, the coeffects of its subterms, through a fixed set of algebraic operators. We show that this principled approach can be adopted to track sharing in the imperative paradigm, that is, links among variables possibly introduced by the execution. This provides a significant example of non-structural coeffects, which cannot be computed by-variable, since the way a given variable is used can affect the coeffects of other variables. To illustrate the effectiveness of the approach, we enhance the type system tracking sharing to model a sophisticated set of features related to uniqueness and immutability. Thanks to the coeffect-based approach, we can express such features in a simple way…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Database Systems and Queries · Service-Oriented Architecture and Web Services · Advanced Software Engineering Methodologies
