Julia's efficient algorithm for subtyping unions and covariant tuples (Pearl) - Inria - Institut national de recherche en sciences et technologies du numérique Accéder directement au contenu
Communication Dans Un Congrès Année : 2019

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

Résumé

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.
Fichier principal
Vignette du fichier
main (2).pdf (677.04 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)
Loading...

Dates et versions

hal-02297696 , version 1 (26-09-2019)

Identifiants

Citer

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⟩
94 Consultations
224 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More