Computer Science > Logic in Computer Science
[Submitted on 8 May 2020 (v1), last revised 3 Sep 2021 (this version, v4)]
Title:π with leftovers: a mechanisation in Agda
View PDFAbstract:Linear type systems need to keep track of how programs use their resources. The standard approach is to use context splits specifying how resources are (disjointly) split across subterms. In this approach, context splits redundantly echo information which is already present within subterms. An alternative approach is to use leftover ty**, where in addition to the usual (input) usage context, ty** judgments have also an output usage context: the leftovers. In this approach, the leftovers of one ty** derivation are fed as input to the next, threading through linear resources while avoiding context splits. We use leftover ty** to define a type system for a resource-aware {\pi}-calculus, a process algebra used to model concurrent systems. Our type system is parametrised over a set of usage algebras that are general enough to encompass shared types (free to reuse and discard), graded types (use exactly n number of times) and linear types (use exactly once). Linear types are important in the {\pi}-calculus: they ensure privacy and safety of communication and avoid race conditions, while graded and shared types allow for more flexible programming. We provide a framing theorem for our type system, generalise the weakening and strengthening theorems to include linear types, and prove subject reduction. Our formalisation is fully mechanised in about 1850 lines of Agda.
Submission history
From: Uma Zalakain [view email][v1] Fri, 8 May 2020 19:49:00 UTC (97 KB)
[v2] Wed, 27 Jan 2021 13:13:18 UTC (47 KB)
[v3] Thu, 22 Apr 2021 08:34:17 UTC (30 KB)
[v4] Fri, 3 Sep 2021 07:54:32 UTC (30 KB)
References & Citations
Bibliographic and Citation Tools
Bibliographic Explorer (What is the Explorer?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)
Code, Data and Media Associated with this Article
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Papers with Code (What is Papers with Code?)
ScienceCast (What is ScienceCast?)
Demos
Recommenders and Search Tools
Influence Flower (What are Influence Flowers?)
Connected Papers (What is Connected Papers?)
CORE Recommender (What is CORE?)
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.