SPLASH 2021
Sun 17 - Fri 22 October 2021 Chicago, Illinois, United States
Thu 21 Oct 2021 11:05 - 11:20 at Zurich B - Dynamic Languages Chair(s): Julia Belyakova
Thu 21 Oct 2021 19:05 - 19:20 at Zurich B - Dynamic Languages - mirror Chair(s): Julia Belyakova

Gradually typed languages allow programmers to mix statically and dynamically typed code, enabling them to incrementally reap the benefits of static typing as they add type annotations to their code. However, this type migration process is typically a manual effort with limited tool support. This paper examines the problem of automated type migration: given a dynamic program, infer additional or improved type annotations.
Existing type migration algorithms prioritize different goals, such as maximizing type precision, maintaining compatibility with unmigrated code, and preserving the semantics of the original program. We argue that the type migration problem involves fundamental compromises: optimizing for a single goal often comes at the expense of others. Ideally, a type migration tool would flexibly accommodate a range of user priorities.
We present TypeWhich, a new approach to automated type migration for the gradually-typed lambda calculus with some extensions. Unlike prior work, which relies on custom solvers, TypeWhich produces constraints for an off-the-shelf MaxSMT solver. This allows us to easily express objectives, such as minimizing the number of necessary syntactic coercions, and constraining the type of the migration to be compatible with unmigrated code.
We present the first comprehensive evaluation of GTLC type migration algorithms, and compare TypeWhich to four other tools from the literature. Our evaluation uses prior benchmarks, and a new set of "challenge problems." Moreover, we design a new evaluation methodology that highlights the subtleties of gradual type migration. In addition, we apply TypeWhich to a suite of benchmarks for Grift, a programming language based on the GTLC. TypeWhich is able to reconstruct all human-written annotations on all but one program.

Thu 21 Oct

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

10:50 - 12:10
Dynamic LanguagesOOPSLA at Zurich B +8h
Chair(s): Julia Belyakova Northeastern University
10:50
15m
Talk
Gradually Structured DataVirtual
OOPSLA
Stefan Malewski University of Chile, Michael Greenberg Stevens Institute of Technology, Éric Tanter University of Chile
DOI Pre-print
11:05
15m
Talk
Solver-Based Gradual Type MigrationVirtual
OOPSLA
Luna Phipps-Costin University of Massachusetts at Amherst, Carolyn Jane Anderson Wellesley College, Michael Greenberg Stevens Institute of Technology, Arjun Guha Northeastern University
DOI Pre-print
11:20
15m
Talk
SimTyper: Sound Type Inference for Ruby using Type Equality PredictionVirtual
OOPSLA
Milod Kazerounian University of Maryland at College Park, Jeffrey S. Foster Tufts University, Bonan Min Raytheon BBN Technologies
DOI
11:35
15m
Talk
Promises Are Made to Be Broken: Migrating R to Strict SemanticsIn-Person
OOPSLA
Aviral Goel Northeastern University, Jan Ječmen Czech Technical University, Sebastián Krynski Czech Technical University, Olivier Flückiger Northeastern University, Jan Vitek Northeastern University; Czech Technical University
DOI
11:50
20m
Live Q&A
Discussion, Questions and Answers
OOPSLA

18:50 - 20:10
Dynamic Languages - mirrorOOPSLA at Zurich B
Chair(s): Julia Belyakova Northeastern University
18:50
15m
Talk
Gradually Structured DataVirtual
OOPSLA
Stefan Malewski University of Chile, Michael Greenberg Stevens Institute of Technology, Éric Tanter University of Chile
DOI Pre-print
19:05
15m
Talk
Solver-Based Gradual Type MigrationVirtual
OOPSLA
Luna Phipps-Costin University of Massachusetts at Amherst, Carolyn Jane Anderson Wellesley College, Michael Greenberg Stevens Institute of Technology, Arjun Guha Northeastern University
DOI Pre-print
19:20
15m
Talk
SimTyper: Sound Type Inference for Ruby using Type Equality PredictionVirtual
OOPSLA
Milod Kazerounian University of Maryland at College Park, Jeffrey S. Foster Tufts University, Bonan Min Raytheon BBN Technologies
DOI
19:35
15m
Talk
Promises Are Made to Be Broken: Migrating R to Strict SemanticsIn-Person
OOPSLA
Aviral Goel Northeastern University, Jan Ječmen Czech Technical University, Sebastián Krynski Czech Technical University, Olivier Flückiger Northeastern University, Jan Vitek Northeastern University; Czech Technical University
DOI
19:50
20m
Live Q&A
Discussion, Questions and Answers
OOPSLA