A Type System for Effect Handlers and Dynamic Labels - Inria - Institut national de recherche en sciences et technologies du numérique Accéder directement au contenu
Communication Dans Un Congrès Année : 2023

A Type System for Effect Handlers and Dynamic Labels

Résumé

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 (545.72 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)
Licence : CC BY - Paternité

Dates et versions

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

Licence

Paternité

Identifiants

Citer

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-03886668v1⟩
58 Consultations
77 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More