On Type-Cases, Union Elimination, and Occurrence Typing - Archive ouverte HAL Access content directly
Journal Articles Proceedings of the ACM on Programming Languages Year : 2022

On Type-Cases, Union Elimination, and Occurrence Typing

Abstract

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
popl22-Castagna_et_al.pdf (1.14 Mo) Télécharger le fichier
Origin Publisher files allowed on an open archive

Dates and versions

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

Licence

Identifiers

Cite

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-03426711v2⟩
334 View
262 Download

Altmetric

Share

Gmail Mastodon Facebook X LinkedIn More