On Type-Cases, Union Elimination, and Occurrence Typing - Archive ouverte HAL
Article Dans Une Revue Proceedings of the ACM on Programming Languages Année : 2022

On Type-Cases, Union Elimination, and Occurrence Typing

Résumé

We extend classic union and intersection type systems with a type-case construction and show that the combination of the union elimination rule of the former and the typing rules for type-cases of our extension encompasses occurrence typing. To apply this system in practice, we define a canonical form for the expressions of our extension, called MSC-form. We show that an expression of the extension is typable if and only if its MSC-form is, and reduce the problem of typing the latter to the one of reconstructing annotations for that term. We provide a sound algorithm that performs this reconstruction and a proof-of-concept implementation
Fichier principal
Vignette du fichier
main.pdf (1.14 Mo) Télécharger le fichier
Origine Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-03426711 , version 1 (12-11-2021)
hal-03426711 , version 2 (20-01-2022)

Licence

Identifiants

Citer

Giuseppe Castagna, Mickael Laurent, Kim Nguyen, Matthew Lutze. On Type-Cases, Union Elimination, and Occurrence Typing. Proceedings of the ACM on Programming Languages, 2022, 49th ACM SIGPLAN Symposium on Principles of Programming Languages, 6 (POPL), pp.75. ⟨10.1145/3498674⟩. ⟨hal-03426711v1⟩
371 Consultations
281 Téléchargements

Altmetric

Partager

More