Julia subtyping: a rational reconstruction

Abstract

Programming languages that support multiple dispatch rely on an expressive notion of subtyping to specify method applicability. In these languages, type annotations on method declarations are used to select, out of a potentially large set of methods, the one that is most appropriate for a particular tuple of arguments. Julia is a language for scientific computing built around multiple dispatch and an expressive subtyping relation. This paper provides the first formal definition of Julia's subtype relation and motivates its design. We validate our specification empirically with an implementation of our definition that we compare against the existing Julia implementation on a collection of real-world programs. Our subtype implementation differs on 122 subtype tests out of 6,014,476. The first 120 differences are due to a bug in Julia that was fixed once reported; the remaining 2 are under discussion.

Document Details

Document Type
Pub Defense Publication
Publication Date
Oct 24, 2018
Source ID
10.1145/3276483

Entities

People

  • Artem Pelenitsyn
  • Benjamin Chung
  • Francesco Zappa Nardelli
  • Jan Vitek
  • Jeff Bezanson
  • Julia Belyakova

Organizations

  • Czech Technical University in Prague
  • European Research Council
  • Julia Computing
  • National Science Foundation
  • Northeastern University
  • Office of Naval Research

Tags

Readers

  • Artificial Intelligence
  • Database Systems and Applications
  • Operations Research