Decidable tag-based semantic subtyping for nominal types, tuples, and unions

J. Belyakova
{"title":"Decidable tag-based semantic subtyping for nominal types, tuples, and unions","authors":"J. Belyakova","doi":"10.1145/3340672.3341115","DOIUrl":null,"url":null,"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.","PeriodicalId":121932,"journal":{"name":"Proceedings of the 21st Workshop on Formal Techniques for Java-like Programs","volume":"118 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2019-07-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"4","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 21st Workshop on Formal Techniques for Java-like Programs","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3340672.3341115","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 4

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.
用于名义类型、元组和联合的可判断的基于标记的语义子类型
语义子类型通过将类型解释为其值的集合,支持对类型进行简单的集合理论推理。在此之前,语义子类型的研究主要是在具有结构类型的静态类型语言背景下进行的。在本文中,我们探讨了语义子类型在具有名义类型的动态语言中的适用性。与静态类型检查不同,动态语言依赖于与值相关的类型标记的运行时检查,因此我们建议使用标记进行语义子类型。我们的工作基于Julia语言的一个片段,并为名义类型、元组和联合提供了基于标记的语义子类型,其中类型在集合理论上被解释为类型标记的集合。证明了所提出的子类型关系是可确定的,并给出了相应的解析定义。本文还讨论了对多个分派使用语义子类型的含义。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信
小红书