arXiv · 1912.08255
Decidable Tag-Based Semantic Subtyping for Nominal Types, Tuples, and Unions
Abstract
Semantic subtyping enables simple, set-theoretical reasoning about types by interpreting a type as the set of its values. Previously, semantic subtyping has been studied primarily in the context of statically typed languages with structural typing. In this paper, we explore the applicability of semantic subtyping in the context of a dynamic language with nominal types. Instead of static type checking, dynamic languages rely on run-time checking of type tags associated with values, so we propose using the tags for semantic subtyping. We base our work on a fragment of the Julia language and present tag-based semantic subtyping for nominal types, tuples, and unions, where types are interpreted set-theoretically, as sets of type tags. The proposed subtyping relation is shown to be decidable, and a corresponding analytic definition is provided. The implications of using semantic subtyping for multiple dispatch are also discussed.
Explore related subjects
Keep this discovery
Julia Belyakova. 2019-12-17. Decidable Tag-Based Semantic Subtyping for Nominal Types, Tuples, and Unions. https://doi.org/10.1145/3340672.3341115
Cite the original work for its findings. Save a collection to share your selection of sources.