Fast and Precise Type Checking for JavaScript

08/26/2017
by   Avik Chaudhuri, et al.
0

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.

READ FULL TEXT
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

01/28/2020

Parallelizing Binary Code Analysis

Binary code analysis is widely used to assess an a program's correctness...
11/09/2020

First Infrastructure and Experimentation in Echo-debugging

As applications get developed, bugs inevitably get introduced. Often, it...
12/12/2018

Bidirectional Type Checking for Relational Properties

Relational type systems have been designed for several applications incl...
09/30/2019

Continuous Flow Analysis to Detect Security Problems

We introduce a tool that supports continuous flow analysis in order to d...
09/01/2019

Refinement type contracts for verification of scientific investigative software

Our scientific knowledge is increasingly built on software output. User ...
08/01/2018

Using Standard Typing Algorithms Incrementally

Modern languages are equipped with static type checking/inference that h...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.