arXiv · 1907.05590
Revisiting Occurrence Typing
Abstract
We revisit occurrence typing, a technique to refine the type of variables occurring in type-cases and, thus, capturesome programming patterns used in untyped languages. Although occurrence typing was tied from its inceptionto set-theoretic types-union types, in particular-it never fully exploited the capabilities of these types. Here weshow how, by using set-theoretic types, it is possible to develop a general typing framework that encompasses andgeneralizes several aspects of current occurrence typing proposals and that can be applied to tackle other problemssuch as the reconstruction of intersection types for unannotated or partially annotated functions and the optimizationof the compilation of gradually typed languages.
Explore related subjects
Keep this discovery
Giuseppe Castagna, Victor Lanvin, Mickaël Laurent, Kim Nguyen. 2019-07-12. Revisiting Occurrence Typing. https://doi.org/10.1016/j.scico.2022.102781
Cite the original work for its findings. Save a collection to share your selection of sources.