Affiliation:
1. Facebook, USA
2. University of California at San Diego, USA
Abstract
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.
Publisher
Association for Computing Machinery (ACM)
Subject
Safety, Risk, Reliability and Quality,Software
Cited by
25 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Enhancing embedded systems development with TS$$^-$$;Automated Software Engineering;2023-12-06
2. Statistical Type Inference for Incomplete Programs;Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering;2023-11-30
3. How Profilers Can Help Navigate Type Migration;Proceedings of the ACM on Programming Languages;2023-10-16
4. Incremental type-checking for free: using scope graphs to derive incremental type-checkers;Proceedings of the ACM on Programming Languages;2022-10-31
5. FlexType: A Plug-and-Play Framework for Type Inference Models;Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering;2022-10-10