kirancodes.me
To Proof Maintenance & Beyond!

JSAI: a static analysis platform for JavaScript

Vineeth Kashyap, Kyle Dewey, Ethan A. Kuefner, John Wagner, Kevin Gibbons, John Sarracino, Ben Wiedermann, Ben Hardekopf

Abstract

JavaScript is used everywhere from the browser to the server, including desktops and mobile devices. However, the current state of the art in JavaScript static analysis lags far behind that of other languages such as C and Java. Our goal is to help remedy this lack. We describe JSAI, a formally specified, robust abstract interpreter for JavaScript. JSAI uses novel abstract domains to compute a reduced product of type inference, pointer analysis, control-flow analysis, string analysis, and integer and boolean constant propagation. Part of JSAI's novelty is user-configurable analysis sensitivity, i.e., context-, path-, and heap-sensitivity. JSAI is designed to be provably sound with respect to a specific concrete semantics for JavaScript, which has been extensively tested against a commercial JavaScript implementation. We provide a comprehensive evaluation of JSAI's performance and precision using an extensive benchmark suite, including real-world JavaScript applications, machine generated JavaScript code via Emscripten, and browser addons. We use JSAI's configurability to evaluate a large number of analysis sensitivities (some well-known, some novel) and observe some surprising results that go against common wisdom. These results highlight the usefulness of a configurable analysis platform such as JSAI.

BibTeX
@inproceedings{Kashyap-al:FSE14,
  author    = {Vineeth Kashyap and
               Kyle Dewey and
               Ethan A. Kuefner and
               John Wagner and
               Kevin Gibbons and
               John Sarracino and
               Ben Wiedermann and
               Ben Hardekopf},
  title     = {{JSAI:} a static analysis platform for {JavaScript}},
  booktitle = {FSE},
  pages     = {121--132},
  publisher = {{ACM}},
  year      = {2014},
}

Related papers