使用JavaScript代理的高效动态接入分析
Efficient Dynamic Access Analysis Using JavaScript Proxies
摘要:
JSConTest为JavaScript引入了效果监控和动态效果推断的概念。它支持使用类似于正则表达式的路径规范来描述效果。它是通过离线源代码转换实现的。为了克服JSConTest实现的局限性,我们通过改变JavaScript代理来重新设计和实现效果监控。我们的新设计避免了先前实现的所有缺点。它保证充分干预;它并不局限于JavaScript的子集;它是自我维护的;它对大型程序的可伸缩性明显优于JSConTest。改进的可伸缩性有两个来源。首先,重新实现比原来的基于转换的实现要快得多。其次,重新实现依赖于飞行权重模式和跟踪减少以节省内存。只有这些技术的结合才能实现对大型程序的监控和推理。
英文摘要:
JSConTest introduced the notions of effect monitoring and dynamic effect inference for JavaScript. It enables the description of effects with path specifications resembling regular expressions. It is implemented by an offline source code transformation. To overcome the limitations of the JSConTest implementation, we redesigned and reimplemented effect monitoring by taking advantange of JavaScript proxies. Our new design avoids all drawbacks of the prior implementation. It guarantees full interposition; it is not restricted to a subset of JavaScript; it is self-maintaining; and its scalability to large programs is significantly better than with JSConTest. The improved scalability has two sources. First, the reimplementation is significantly faster than the original, transformation-based implementation. Second, the reimplementation relies on the fly-weight pattern and on trace reduction to conserve memory. Only the combination of these techniques enables monitoring and inference for large programs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。