尚未生成 AI 速览(可能缺少 API key 或等待下次运行补跑)。
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.
DOI 原文 ·
@article{paperbot1563,
title = {On type-cases, union elimination, and occurrence typing},
author = {Giuseppe Castagna and Mickaël Laurent and Kim Nguyễn and Matthew Lutze},
journal = {Proceedings of the ACM on Programming Languages},
volume = {6},
number = {POPL},
year = {2022},
doi = {10.1145/3498674}
}