Optional typing is traditionally viewed as a compromise between static and dynamic type checking, where code without type annotations is not checked until runtime. We demonstrate that optional type annotations in Dart programs can be integrated into a flow analysis to provide static type safety guarantees both for annotated and non-annotated parts of the code. We explore two approaches: one that uses type annotations for filtering, and one that uses them as specifications. What makes this particularly challenging for Dart is that its type system is unsound even for fully annotated code.
Experimental results show that the technique is remarkably effective, even without context sensitivity: 99.3% of all property lookup operations are reported type safe in a collection of benchmark programs.
Tue 1 Nov
|10:30 - 10:55|
Gianluca MezzettiAarhus University, Denmark, Anders MøllerAarhus University, Denmark, Fabio StroccoAarhus University, DenmarkDOI
|10:55 - 11:20|
Thomas S. HeinzeAarhus University, Denmark, Anders MøllerAarhus University, Denmark, Fabio StroccoAarhus University, DenmarkDOI
|11:20 - 11:45|
Changhee ParkKAIST, South Korea, Hyeonseung ImKangwon National University, South Korea, Sukyoung RyuKAIST, South KoreaDOI
|11:45 - 12:10|
Mattias De WaelVrije Universiteit Brussel, Belgium, Janwillem SwalensVrije Universiteit Brussel, Belgium, Wolfgang De MeuterVrije Universiteit Brussel, BelgiumDOI Pre-print File Attached