Type Unsoundness in Practice: An Empirical Study of Dart
The type system in the Dart programming language is deliberately designed to be unsound: for a number of reasons, it may happen that a program encounters type errors at runtime although the static type checker reports no warnings. According to the language designers, this ensures a pragmatic balance between the ability to catch bugs statically and allowing a flexible programming style without burdening the programmer with a lot of spurious type warnings.
In this work, we attempt to experimentally validate these design choices. Through an empirical evaluation based on open source programs written in Dart totaling 2.4 M LOC, we explore how alternative, more sound choices affect the type warnings being produced. Our results show that some, but not all, sources of unsoundness can be justified. In particular, we find that unsoundness caused by bivariant function subtyping and method overriding does not seem to help programmers. Such information may be useful when designing future versions of the language or entirely new languages.
Tue 1 NovDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
10:30 - 12:10 | |||
10:30 25mTalk | Type Unsoundness in Practice: An Empirical Study of Dart DLS Gianluca Mezzetti Aarhus University, Denmark, Anders Møller Aarhus University, Denmark, Fabio Strocco Aarhus University, Denmark DOI | ||
10:55 25mTalk | Type Safety Analysis for Dart DLS Thomas S. Heinze Aarhus University, Denmark, Anders Møller Aarhus University, Denmark, Fabio Strocco Aarhus University, Denmark DOI | ||
11:20 25mTalk | Precise and Scalable Static Analysis of jQuery using a Regular Expression Domain DLS Changhee Park KAIST, South Korea, Hyeonseung Im Kangwon National University, South Korea, Sukyoung Ryu KAIST, South Korea DOI | ||
11:45 25mTalk | Just-in-Time Inheritance: A Dynamic and Implicit Multiple Inheritance Mechanism DLS Mattias De Wael Vrije Universiteit Brussel, Belgium, Janwillem Swalens Vrije Universiteit Brussel, Belgium, Wolfgang De Meuter Vrije Universiteit Brussel, Belgium DOI Pre-print File Attached |