Replicate, Reuse, Repeat: Capturing Non-Linear Communication via Session Types and Graded Modal Types

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Marshall, Danielle, Orchard, Dominic
Natura: Preprint
Pubblicazione: 2022
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866916448106971136
author Marshall, Danielle
Orchard, Dominic
author_facet Marshall, Danielle
Orchard, Dominic
contents Session types provide guarantees about concurrent behaviour and can be understood through their correspondence with linear logic, with propositions as sessions and proofs as processes. However, a strictly linear setting is somewhat limiting, since there exist various useful patterns of communication that rely on non-linear behaviours. For example, shared channels provide a way to repeatedly spawn a process with binary communication along a fresh linear session-typed channel. Non-linearity can be introduced in a controlled way in programming through the general concept of graded modal types, which are a framework encompassing various kinds of coeffect typing (describing how computations make demands on their context). This paper shows how graded modal types can be leveraged alongside session types to enable various non-linear concurrency behaviours to be re-introduced in a precise manner in a type system with a linear basis. The ideas here are demonstrated using Granule, a functional programming language with linear, indexed, and graded modal types.
format Preprint
id arxiv_https___arxiv_org_abs_2203_12875
institution arXiv
publishDate 2022
record_format arxiv
spellingShingle Replicate, Reuse, Repeat: Capturing Non-Linear Communication via Session Types and Graded Modal Types
Marshall, Danielle
Orchard, Dominic
Programming Languages
F.3.3; D.3.2; F.3.2
Session types provide guarantees about concurrent behaviour and can be understood through their correspondence with linear logic, with propositions as sessions and proofs as processes. However, a strictly linear setting is somewhat limiting, since there exist various useful patterns of communication that rely on non-linear behaviours. For example, shared channels provide a way to repeatedly spawn a process with binary communication along a fresh linear session-typed channel. Non-linearity can be introduced in a controlled way in programming through the general concept of graded modal types, which are a framework encompassing various kinds of coeffect typing (describing how computations make demands on their context). This paper shows how graded modal types can be leveraged alongside session types to enable various non-linear concurrency behaviours to be re-introduced in a precise manner in a type system with a linear basis. The ideas here are demonstrated using Granule, a functional programming language with linear, indexed, and graded modal types.
title Replicate, Reuse, Repeat: Capturing Non-Linear Communication via Session Types and Graded Modal Types
topic Programming Languages
F.3.3; D.3.2; F.3.2
url https://arxiv.org/abs/2203.12875