TY - GEN
T1 - Efficient and precise dynamic slicing for client-side Javascript programs
AU - Ye, Jiabin
AU - Zhang, Cheng
AU - Ma, Lei
AU - Yu, Haibo
AU - Zhao, Jianjun
N1 - Funding Information:
ACKNOWLEDGMENT This research is partially sponsored by 973 Program in China (Grant No. 2015CB352203), and the National Nature Science Foundation of China (NSFC) (Grant No. 61272102).
Publisher Copyright:
© 2016 IEEE
PY - 2016/5/20
Y1 - 2016/5/20
N2 - JavaScript is the de facto dominant programming language for developing web applications. Most popular websites are using JavaScript, especially to develop client-side features. Being syntactically flexible and highly dynamic, JavaScript is easy to use and productive, but its code is known to be less maintainable. The task of maintaining client-side JavaScript code is further complicated by the pervasive interactions between JavaScript code and HTML elements, through browsers. In this paper, we present JS-Slicer, a dynamic slicer for JavaScript, to ease the task of understanding and debugging practical client-side JavaScript code. JS-Slicer defines three types of dependences, including data dependences, control dependences, and DOM dependences, to capture all relationships between program elements. JS-Slicer extends a novel dynamic analysis framework and combines dynamic and static analysis to precisely capture the dependences at run-time. A lot of language specific issues are properly handled, which enables JS-Slicer to slice practical JavaScript code. Our evaluation on six real-world web applications and JavaScript libraries shows that JS-Slicer is both precise and efficient: on average it captures around 40K dependences in 2.5K lines of code, in less than 3.0 seconds.
AB - JavaScript is the de facto dominant programming language for developing web applications. Most popular websites are using JavaScript, especially to develop client-side features. Being syntactically flexible and highly dynamic, JavaScript is easy to use and productive, but its code is known to be less maintainable. The task of maintaining client-side JavaScript code is further complicated by the pervasive interactions between JavaScript code and HTML elements, through browsers. In this paper, we present JS-Slicer, a dynamic slicer for JavaScript, to ease the task of understanding and debugging practical client-side JavaScript code. JS-Slicer defines three types of dependences, including data dependences, control dependences, and DOM dependences, to capture all relationships between program elements. JS-Slicer extends a novel dynamic analysis framework and combines dynamic and static analysis to precisely capture the dependences at run-time. A lot of language specific issues are properly handled, which enables JS-Slicer to slice practical JavaScript code. Our evaluation on six real-world web applications and JavaScript libraries shows that JS-Slicer is both precise and efficient: on average it captures around 40K dependences in 2.5K lines of code, in less than 3.0 seconds.
UR - http://www.scopus.com/inward/record.url?scp=85044077324&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85044077324&partnerID=8YFLogxK
U2 - 10.1109/SANER.2016.96
DO - 10.1109/SANER.2016.96
M3 - Conference contribution
AN - SCOPUS:85044077324
T3 - 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering, SANER 2016
SP - 449
EP - 459
BT - 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering, SANER 2016
PB - Institute of Electrical and Electronics Engineers Inc.
T2 - 23rd IEEE International Conference on Software Analysis, Evolution, and Reengineering, SANER 2016
Y2 - 14 March 2016 through 18 March 2016
ER -