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

page 1

page 2

page 3

page 4

research
01/28/2020

Parallelizing Binary Code Analysis

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

First Infrastructure and Experimentation in Echo-debugging

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

Bidirectional Type Checking for Relational Properties

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

Continuous Flow Analysis to Detect Security Problems

We introduce a tool that supports continuous flow analysis in order to d...
research
07/15/2022

Flow Moods: Recommending Music by Moods on Deezer

The music streaming service Deezer extensively relies on its Flow algori...
research
09/01/2019

Refinement type contracts for verification of scientific investigative software

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

Certificate Enhanced Data-Flow Analysis

Proof-carrying-code was proposed as a solution to ensure a trust relatio...

Please sign up or login with your details

Forgot password? Click here to reset