paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Accelerating JavaScript static analysis via dynamic shortcuts

通过动态捷径加速 JavaScript 静态分析
FSE Proceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering2021匹配度 3/10 · 论文聚焦JavaScript静态分析与动态执行结合,属于程序分析与抽象解释领域,但未涉及LLM/Agent、浮点程序分析或贝叶斯程序分析,与用户核心交叉方向匹配度低。引用 14 inbox
Joonyoung Park, Jihyeok Park, Dongjun Youn, Sukyoung Ryu
crossref: 2026-09-12

AI 速览

一句话:提出动态捷径,在 JavaScript 静态分析中可靠切换抽象与具体执行,用 JS 引擎加速并提升精度。

JavaScript 的函数式与动态特性会降低静态分析的性能和精度,且内置函数与宿主环境需要大量手工建模。已有结合动态分析的方法未能充分利用高性能 JS 引擎,并常牺牲可靠性。本文提出动态捷径(dynamic shortcuts),在 JavaScript 静态分析中可靠地在抽象执行与具体执行之间切换,借助高度优化的商业 JavaScript 引擎提升分析性能与精度,并减少对不透明代码的建模工作。作者将 SAFE 静态分析器与 Jalangi 动态分析器组合成 SAFEDS。在 Lodash 4 的 269 个官方测试上评估,SAFEDS 比基线静态分析器快 7.81 倍,并对 22 个不透明函数平均将失败断言减少 12.31%,说明精度得到提升。

问题
JavaScript 的动态特性使静态分析性能与精度下降,内置函数和宿主环境还需大量手工建模;已有动静结合方法未充分利用动态分析性能且可能牺牲可靠性。
方法
提出动态捷径,在静态分析中可靠切换抽象执行与具体执行,并用 SAFE 与 Jalangi 实现 SAFEDS。
评估
在 Lodash 4 的 269 个官方测试上评估,SAFEDS 比基线分析器快 7.81 倍,对 22 个不透明函数平均减少 12.31% 的失败断言。
原文摘要(Abstract)

JavaScript has become one of the most widely used programming languages for web development, server-side programming, and even micro-controllers for IoT. However, its extremely functional and dynamic features degrade the performance and precision of static analysis. Moreover, the variety of built-in functions and host environments requires excessive manual modeling of their behaviors. To alleviate these problems, researchers have proposed various ways to leverage dynamic analysis during JavaScript static analysis. However, they do not fully utilize the high performance of dynamic analysis and often sacrifice the soundness of static analysis. In this paper, we present dynamic shortcuts, a new technique to flexibly switch between abstract and concrete execution during JavaScript static analysis in a sound way. It can significantly improve the analysis performance and precision by using highly-optimized commercial JavaScript engines and lessen the modeling efforts for opaque code. We actualize the technique via SAFEDS, an extended combination of SAFE and Jalangi, a static analyzer and a dynamic analyzer, respectively. We evaluated SAFEDS using 269 official tests of Lodash 4 library. Our experiment shows that SAFEDS is 7.81x faster than the baseline static analyzer, and it improves the precision to reduce failed assertions by 12.31% on average for 22 opaque functions.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot6402,
  title = {Accelerating JavaScript static analysis via dynamic shortcuts},
  author = {Joonyoung Park and Jihyeok Park and Dongjun Youn and Sukyoung Ryu},
  booktitle = {FSE},
  year = {2021},
  doi = {10.1145/3468264.3468556}
}