Julia ’ s efficient algorithm for subtyping unions and 1 covariant tuples

semanticscholar(2019)

引用 0|浏览0
暂无评分
摘要
9 The Julia programming language supports multiple dispatch and provides a rich type annotation 10 language to specify method applicability. When multiple methods are applicable for a given call, 11 Julia relies on subtyping between method signatures to pick the correct method to invoke. Julia’s 12 subtyping algorithm is surprisingly complex, and determining whether it is correct remains an open 13 question. In this paper, we focus on one piece of this problem: the interaction between union 14 types and covariant tuples. Previous work normalized unions inside tuples to disjunctive normal 15 form. However, this strategy has two drawbacks: complex type signatures induce space explosion, 16 and interference between normalization and other features of Julia’s type system. In this paper, 17 we describe the algorithm that Julia uses to compute subtyping between tuples and unions—an 18 algorithm that is immune to space explosion and plays well with other features of the language. We 19 prove this algorithm correct and complete against a semantic-subtyping denotational model in Coq. 2
更多
查看译文
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要