On Type-Cases, Union Elimination, and Occurrence Typing

PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL(2022)

引用 8|浏览4
暂无评分
摘要
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.
更多
查看译文
关键词
subtyping, union types, intersection types, type-case, dynamic languages, type systems
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要