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
31 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Nominal Types for Erlang;Proceedings of the 23rd ACM SIGPLAN International Workshop on Erlang;2024-08-28
2. Decidable Subtyping of Existential Types for Julia;Proceedings of the ACM on Programming Languages;2024-06-20
3. Gradually Typed Languages Should Be Vigilant!;Proceedings of the ACM on Programming Languages;2024-04-29
4. Static Blame for gradual typing;Journal of Functional Programming;2024
5. Gradual Typing Performance, Micro Configurations and Macro Perspectives;Lecture Notes in Computer Science;2024