Static Analysis with Demand-driven Value Refinement

Benno Stein, Benjamin Barslev Nielsen, Bor-Yuh Evan Chang, Anders Møller

Research output: Contribution to journal/Conference contribution in journal/Contribution to newspaperJournal articleResearchpeer-review

12 Citations (Scopus)
89 Downloads (Pure)

Abstract

Static analysis tools for JavaScript must strike a delicate balance, achieving the level of precision required by the most complex features of target programs without incurring prohibitively high analysis time. For example, reasoning about dynamic property accesses sometimes requires precise relational information connecting the object, the dynamically-computed property name, and the property value. Even a minor precision loss at such critical program locations can result in a proliferation of spurious dataflow that renders the analysis results useless. We present a technique by which a conventional non-relational static dataflow analysis can be combined soundly with a value refinement mechanism to increase precision on demand at critical locations. Crucially, our technique is able to incorporate relational information from the value refinement mechanism into the non-relational domain of the dataflow analysis. We demonstrate the feasibility of this approach by extending an existing JavaScript static analysis with a demand-driven value refinement mechanism that relies on backwards abstract interpretation. Our evaluation finds that precise analysis of widely used JavaScript utility libraries depends heavily on the precision at a small number of critical locations that can be identified heuristically, and that backwards abstract interpretation is an effective mechanism to provide that precision on demand.

Original languageEnglish
Article number140
JournalProceedings of the ACM on Programming Languages
Volume3
IssueOOPSLA
Number of pages29
ISSN2475-1421
DOIs
Publication statusPublished - 2019

Fingerprint

Dive into the research topics of 'Static Analysis with Demand-driven Value Refinement'. Together they form a unique fingerprint.

Cite this