Julia's Efficient Algorithm for Subtyping Unions and Covariant Tuples
The Julia programming language supports multiple dispatch and provides a rich type annotation language to specify method applicability. When multiple methods are applicable for a given call, Julia relies on subtyping between method signatures to pick the correct method to invoke. Julia’s subtyping algorithm is surprisingly complex, and determining whether it is correct remains an open question. In this paper, we focus on one piece of this problem: the interaction between union types and covariant tuples. Previous work normalized unions inside tuples to disjunctive normal form. However, this strategy has two drawbacks: complex type signatures induce space explosion, and interference between normalization and other features of Julia’s type system. In this paper, we describe the algorithm that Julia uses to compute subtyping between tuples and unions - an algorithm that is immune to space explosion and plays well with other features of the language. We prove this algorithm correct and complete against a semantic-subtyping denotational model in Coq.
Wed 17 JulDisplayed time zone: Belfast change
13:30 - 15:10 | |||
13:30 20mResearch paper | Transient Typechecks are (Almost) Free Research Papers Richard Roberts Victoria University of Wellington, Stefan Marr University of Kent, Michael Homer Victoria University of Wellington, James Noble Victoria University of Wellington DOI Media Attached | ||
13:50 20mResearch paper | A Typing Discipline for Hardware Interfaces Research Papers DOI Media Attached | ||
14:10 20mResearch paper | Minimal Session Types Research Papers Alen Arslanagić University of Groningen, Jorge A. Pérez University of Groningen, The Netherlands, Erik Voogd University of Oslo DOI Media Attached | ||
14:30 20mResearch paper | Julia's Efficient Algorithm for Subtyping Unions and Covariant Tuples Research Papers Benjamin Chung Northeastern University, Francesco Zappa Nardelli Inria, Jan Vitek Northeastern University DOI Media Attached | ||
14:50 20mResearch paper | On Satisfiability of Nominal Subtyping with Variance Research Papers Aleksandr Misonizhnik Saint-Petersburg State University, Dmitry Mordvinov Saint-Petersburg State University, JetBrains Research DOI Media Attached |