Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik GmbH Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik GmbH scholarly article en Chung, Benjamin; Zappa Nardelli, Francesco; Vitek, Jan http://www.dagstuhl.de/lipics License
when quoting this document, please refer to the following
DOI:
URN: urn:nbn:de:0030-drops-108165
URL:

; ;

Julia's Efficient Algorithm for Subtyping Unions and Covariant Tuples (Pearl)

pdf-format:


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.

BibTeX - Entry

@InProceedings{chung_et_al:LIPIcs:2019:10816,
  author =	{Benjamin Chung and Francesco Zappa Nardelli and Jan Vitek},
  title =	{{Julia's Efficient Algorithm for Subtyping Unions and Covariant Tuples (Pearl)}},
  booktitle =	{33rd European Conference on Object-Oriented Programming (ECOOP 2019)},
  pages =	{24:1--24:15},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-111-5},
  ISSN =	{1868-8969},
  year =	{2019},
  volume =	{134},
  editor =	{Alastair F. Donaldson},
  publisher =	{Schloss Dagstuhl--Leibniz-Zentrum fuer Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{http://drops.dagstuhl.de/opus/volltexte/2019/10816},
  URN =		{urn:nbn:de:0030-drops-108165},
  doi =		{10.4230/LIPIcs.ECOOP.2019.24},
  annote =	{Keywords: Type systems, Subtyping, Union types}
}

Keywords: Type systems, Subtyping, Union types
Seminar: 33rd European Conference on Object-Oriented Programming (ECOOP 2019)
Issue date: 2019
Date of publication: 2019


DROPS-Home | Fulltext Search | Imprint | Privacy Published by LZI