DLS 2020
Sun 15 - Fri 20 November 2020 Online Conference
co-located with SPLASH 2020
Wed 18 Nov 2020 16:00 - 16:20 at SPLASH-III - 4 Chair(s): Antoine Miné, Jeremy G. Siek
Thu 19 Nov 2020 04:00 - 04:20 at SPLASH-III - 4 Chair(s): Shigeru Chiba, Caterina Urban

Many researchers have explored retrofitting static type systems to dynamic languages. This raises the question of how to add type annotations to code that was previously untyped. One obvious solution is type inference. However, in complex type systems, in particular those with structural types, type inference typically produces most general types that are large, hard to understand, and unnatural for programmers. To solve this problem, we introduce InferDL, a novel Ruby type inference system that infers sound and useful type annotations by incorporating heuristics that guess types. For example, we might heuristically guess that a parameter whose name ends in ``count'' is an integer. InferDL works by first running standard type inference and then applying heuristics to any positions for which standard type inference produces overly-general types. Heuristic guesses are added as constraints to the type inference problem to ensure they are consistent with the rest of the program and other heuristic guesses; inconsistent guesses are discarded. We formalized InferDL in a core type and constraint language. We implemented InferDL on top of RDL, an existing Ruby type checker. To evaluate InferDL, we applied it to four Ruby on Rails apps that had been previously type checked with RDL, and hence had type annotations. We found that, when using heuristics, InferDL inferred 22% more types that were as or more precise than the previous annotations, compared to standard type inference without heuristics. We also found one new type error. We further evaluated InferDL by applying it to six additional apps, finding five additional type errors. Thus, we believe InferDL represents a promising approach for inferring type annotations in dynamic languages.

Wed 18 Nov

Displayed time zone: Central Time (US & Canada) change

15:00 - 16:20
4DLS 2020 / SAS at SPLASH-III +12h
Chair(s): Antoine Miné Sorbonne Université, Jeremy G. Siek Indiana University, USA
15:00
20m
Research paper
Memory-Efficient Fixpoint ComputationArtifact
SAS
Sung Kook Kim University of California, Davis, Arnaud J. Venet Facebook, Aditya V. Thakur University of California, Davis
Pre-print Media Attached
15:20
20m
Talk
Dynamic Pattern Matching with Python
DLS 2020
Tobias Kohn University of Cambridge, UK, Guido van Rossum Python Software Foundation, Brandt Bucher Research Affiliates, LLC, Talin , Ivan Levkivskyi Dropbox Ireland
Link to publication DOI Media Attached
15:40
20m
Research paper
Simple and Efficient Computation of Minimal Weak Control ClosureArtifact
SAS
Abu Naser Masud Malardalen University
Media Attached File Attached
16:00
20m
Talk
Sound, Heuristic Type Annotation Inference for Ruby
DLS 2020
Milod Kazerounian University of Maryland, College Park, Brianna M. Ren University of Maryland, Jeffrey S. Foster Tufts University
Link to publication DOI Pre-print Media Attached

Thu 19 Nov

Displayed time zone: Central Time (US & Canada) change

03:00 - 04:20
4SAS / DLS 2020 at SPLASH-III
Chair(s): Shigeru Chiba The University of Tokyo, Caterina Urban École normale supérieure
03:00
20m
Research paper
Memory-Efficient Fixpoint ComputationArtifact
SAS
Sung Kook Kim University of California, Davis, Arnaud J. Venet Facebook, Aditya V. Thakur University of California, Davis
Pre-print Media Attached
03:20
20m
Talk
Dynamic Pattern Matching with Python
DLS 2020
Tobias Kohn University of Cambridge, UK, Guido van Rossum Python Software Foundation, Brandt Bucher Research Affiliates, LLC, Talin , Ivan Levkivskyi Dropbox Ireland
Link to publication DOI Media Attached
03:40
20m
Research paper
Simple and Efficient Computation of Minimal Weak Control ClosureArtifact
SAS
Abu Naser Masud Malardalen University
Media Attached File Attached
04:00
20m
Talk
Sound, Heuristic Type Annotation Inference for Ruby
DLS 2020
Milod Kazerounian University of Maryland, College Park, Brianna M. Ren University of Maryland, Jeffrey S. Foster Tufts University
Link to publication DOI Pre-print Media Attached