Fast and precise type checking for JavaScript
By Avik Chaudhuri, Panagiotis Vekris, Sam Goldman, Marshall Roch, Gabriel Levi. 2017
58 citations recorded by the source corpus.
In this paper we present the design and implementation of Flow, a fast and precise type checker for JavaScript that is used by thousands of developers on millions of lines of code at Facebook every day. Flow uses sophisticated type inference to understand common JavaScript idioms precisely. This helps it find non-trivial bugs in code and provide code intelligence to editors without requiring significant rewriting or annotations from the developer. We formalize an important fragment of Flow's analysis and prove its soundness. Furthermore, Flow uses aggressive parallelization and incrementalization to deliver near-instantaneous response times. This helps it avoid introducing any latency in the usual edit-refresh cycle of rapid JavaScript development. We describe the algorithms and systems infrastructure that we built to scale Flow's analysis.
Subfields: Artificial Intelligence, Information Systems, Program Analysis & Verification, Signal Processing, Software Engineering
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Artificial Intelligence
- Ming-Ho Yee
- Arjun Guha
- Sheng Chen
- Shriram Krishnamurthi
- Martin Erwig
- Eric Walkingshaw
- John Peter Campora III
- Anders Møller
In Information Systems
- Ming-Ho Yee
- Arjun Guha
- Sheng Chen
- Shriram Krishnamurthi
- Martin Erwig
- Eric Walkingshaw
- John Peter Campora III
- Anders Møller
In Program Analysis & Verification
- Ming-Ho Yee
- Arjun Guha
- Sheng Chen
- Shriram Krishnamurthi
- Martin Erwig
- Eric Walkingshaw
- John Peter Campora III
- Anders Møller
In Signal Processing
In Software Engineering
- Ming-Ho Yee
- Arjun Guha
- Sheng Chen
- Shriram Krishnamurthi
- Martin Erwig
- Eric Walkingshaw
- John Peter Campora III
- Anders Møller
Citations in the corpus
- Do Machine Learning Models Produce TypeScript Types that Type Check? (2023, background): “Over the past decade, gradual typing has proliferated, and there are now gradually typed versions of several mainstream languages [6, 7, 11, 14, 31, 33, 37, 48, 52].”
- Migrating gradual types (2017, background): “The inference in flow (Chaudhuri et al., 2017) is also flow-based and was specifically designed to not produce false positives for idioms that are commonly used in JavaScript.”
- Gradual Soundness: Lessons from Static Python (2022, background): “Industry teams have developed innovative optional type systems that accommodate untyped designs, but are unsound [2, 7, 45, 63].”