We present a type system and inference algorithm for a rich subset
of JavaScript equipped with objects, structural subtyping, prototype inheritance, and first-class methods. The type system supports
abstract and recursive objects, and is expressive enough to
accommodate several standard benchmarks with only minor workarounds.
The invariants enforced by the types enable an ahead-of-time
compiler to carry out optimizations typically beyond the reach of
static compilers for dynamic languages. Unlike previous inference
techniques for prototype inheritance, our algorithm uses a
combination of lower and upper bound propagation to infer types and
discover type errors in all code, including uninvoked
functions. The inference is expressed in a simple constraint
language, designed to leverage off-the-shelf fixed point solvers.
We prove soundness for both the type system and inference algorithm.
An experimental evaluation showed that the inference is powerful,
handling the aforementioned benchmarks with no manual type annotation, and
that the inferred types enable effective static compilation.
Wed 2 NovDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
15:40 - 17:20 | |||
15:40 25mTalk | Accelerating Program Analyses by Cross-Program Training OOPSLA Sulekha Kulkarni Georgia Tech, Ravi Mangal Georgia Institute of Technology, Xin Zhang Georgia Tech, Mayur Naik Georgia Tech DOI | ||
16:05 25mTalk | An Improved Algorithm for Slicing Machine Code OOPSLA Venkatesh Srinivasan University of Wisconsin - Madison, Thomas Reps University of Wisconsin - Madison and Grammatech Inc. DOI Pre-print | ||
16:30 25mTalk | Call Graphs for Languages with Parametric Polymorphism OOPSLA Dmytro Petrashko EPFL, Vlad Ureche EPFL, Switzerland, Ondřej Lhoták University of Waterloo, Martin Odersky EPFL, Switzerland DOI | ||
16:55 25mTalk | Type Inference for Static Compilation of JavaScript OOPSLA Satish Chandra Samsung Research America, Colin Gordon Drexel University, Jean-Baptiste Jeannin Carnegie Mellon University , Cole Schlesinger Samsung Research America, Manu Sridharan Samsung Research America, Frank Tip Samsung Research America, Young-il Choi Samsung Electronics DOI Pre-print |