HAL will be down for maintenance from Friday, June 10 at 4pm through Monday, June 13 at 9am. More information
Skip to Main content Skip to Navigation
Conference papers

Julia's efficient algorithm for subtyping unions and covariant tuples (Pearl)

Benjamin Chung 1 Francesco Zappa Nardelli 2 Jan Vitek 1, 3
2 Parkas - Parallélisme de Kahn Synchrone
DI-ENS - Département d'informatique - ENS Paris, CNRS - Centre National de la Recherche Scientifique, Inria de Paris
Abstract : 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.
Document type :
Conference papers
Complete list of metadata

Cited literature [27 references]  Display  Hide  Download

Contributor : Francesco Zappa Nardelli Connect in order to contact the contributor
Submitted on : Thursday, September 26, 2019 - 12:44:42 PM
Last modification on : Thursday, March 17, 2022 - 10:08:54 AM
Long-term archiving on: : Monday, February 10, 2020 - 6:03:32 AM


main (2).pdf
Files produced by the author(s)




Benjamin Chung, Francesco Zappa Nardelli, Jan Vitek. Julia's efficient algorithm for subtyping unions and covariant tuples (Pearl). ECOOP 2019 - 33rd European Conference of Object-Oriented Programming, Jul 2019, London, United Kingdom. ⟨10.4230/LIPIcs.ECOOP.2019.6⟩. ⟨hal-02297696⟩



Record views


Files downloads