Precise and scalable static analysis of jQuery using a regular expression domain
Open Access
- 1 November 2016
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 25-36
Abstract
JQuery is the most popular JavaScript library but the state-of-the-art static analyzers for JavaScript applications fail to analyze simple programs that use jQuery. In this paper, we present a novel abstract string domain whose elements are simple regular expressions that can represent prefix, infix, and postfix substrings of a string and even their sets. We formalize the new domain in the abstract interpretation framework with abstract models of strings and objects commonly used in the existing JavaScript analyzers. For practical use of the domain, we present polynomial-time inclusion decision rules between the regular expressions and prove that the rules exactly capture the actual inclusion relation. We have implemented the domain as an extension of the open-source JavaScript analyzer, SAFE, and we show that the extension significantly improves the scalability and precision of the baseline analyzer in analyzing programs that use jQuery.Keywords
Funding Information
- National Research Foundation of Korea (NRF-2014R1A2A2A01003235 and 2016R1C1B1015095)
- Samsung Electronics
This publication has 18 references indexed in Scilit:
- JSAI: a static analysis platform for JavaScript2014
- Determinacy in static analysis for jQuery2014
- The inclusion problem for regular expressionsJournal of Computer and System Sciences, 2012
- Modeling the HTML DOM and browser API in static analysis of JavaScript web applications2011
- Type Analysis for JavaScript2009
- A Practical String Analyzer by the Widening ApproachLecture Notes in Computer Science, 2006
- Regular expression types for XMLACM Transactions on Programming Languages and Systems, 2005
- Precise Analysis of String Expressions2003
- On-the-fly analysis of systems with unbounded, lossy FIFO channelsLecture Notes in Computer Science, 1998
- Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints1977