A Type System for Effect Handlers and Dynamic Labels - Inria - Institut national de recherche en sciences et technologies du numérique
Conference Papers Year : 2023

A Type System for Effect Handlers and Dynamic Labels

Abstract

We consider a simple yet expressive λ-calculus equipped with references, effect handlers, and dynamic allocation of effect labels, and whose operational semantics does not involve coercions or rely on type information. We equip this language with a type system that supports type and effect polymorphism, allows reordering row entries and extending a row with new entries, and supports (but is not restricted to) lexically scoped handlers. This requires addressing the issue of potential aliasing between effect names. Our original solution is to interpret a row not only as a permission to perform certain effects but also as a disjointness requirement bearing on effect names. The type system guarantees strong type soundness: a well-typed program cannot crash or perform an unhandled effect. We prove this fact by encoding the type system into a novel Separation Logic for effect handlers, which we build on top of Iris. Our results are formalized in Coq.
Fichier principal
Vignette du fichier
de-vilhena-pottier-tes.pdf (574.66 Ko) Télécharger le fichier
Origin Files produced by the author(s)

Dates and versions

hal-03886668 , version 1 (06-12-2022)
hal-03886668 , version 2 (01-12-2023)

Licence

Identifiers

Cite

Paulo Emílio de Vilhena, François Pottier. A Type System for Effect Handlers and Dynamic Labels. European Symposium on Programming, Apr 2023, Paris, France. pp.225-252, ⟨10.1007/978-3-031-30044-8_9⟩. ⟨hal-03886668v2⟩
76 View
96 Download

Altmetric

Share

More