paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Efficient module-level dynamic analysis for dynamic languages with module recontextualization

基于模块重语境化的动态语言高效模块级动态分析
FSE Proceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering2021匹配度 1/10 · 该论文研究动态语言的模块级动态分析技术,属于程序分析与运行时管理领域,但与用户当前核心方向(LLM/Agent 与静态分析/形式化验证交叉、浮点程序分析、贝叶斯程序分析)无直接关联,也未涉及 AI/LLM、ML 系统或 Agentic 程序。引用 6 inbox
Nikos Vasilakis, Grigoris Ntousakis, Veit Heller, Martin C. Rinard
crossref: 2026-09-12

AI 速览

一句话:提出模块重语境化技术,在未修改的生产运行时中实现高效的模块级动态分析。

动态程序分析长期用于获取程序执行信息,但现有系统在生产语言运行时中往往带来高昂开销。本文提出模块重语境化(module recontextualization),利用 JavaScript、Racket 等现代动态语言在运行时以字符串形式加载模块代码的导入机制,在模块加载前对其进行轻量级加载时代码变换:变换作用于模块的字符串表示及其即将绑定的上下文,将开发者提供的、分析专用的代码插入模块,从而在未修改的生产语言运行时环境中捕获围绕该模块的所有交互。作者在 JavaScript 和 Racket 生态中分别实现系统,并评估表明该方法相较当前最先进的动态分析系统可带来数量级(order-of-magnitude)的性能提升,同时支持多种分析,平均每种分析仅需约 100 行代码实现。

问题
在生产语言运行时中进行动态程序分析通常开销巨大,难以兼顾效率与对模块级交互的完整捕获。
方法
利用动态语言模块导入以字符串加载代码的特性,在加载前对模块字符串及其绑定上下文做轻量级变换,插入分析专用代码,从而在未修改的运行时中捕获模块周边全部交互。
评估
在 JavaScript 和 Racket 两个生态中实现该系统,与最先进的动态分析系统对比,显示数量级性能提升,并以平均约 100 行代码支持多种分析。
原文摘要(Abstract)

Dynamic program analysis is a long-standing technique for obtaining information about program execution. We present module recontextualization, a new dynamic analysis approach that targets modern dynamic languages such as JavaScript and Racket, enabled by the fact that they feature a module-import mechanism that loads code at runtime as a string. This approach uses lightweight load-time code transformations that operate on the string representation of the module, as well as the context to which it is about to be bound, to insert developer-provided, analysis-specific code into the module before it is loaded. This code implements the dynamic analysis, enabling this approach to capture all interactions around the module in unmodified production language runtime environments. We implement this approach in two systems targeting the JavaScript and Racket ecosystems. Our evaluation shows that this approach can deliver order-of-magnitude performance improvements over state-of-the-art dynamic analysis systems while supporting a range of analyses, implemented on average in about 100 lines of code.

链接与引用

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

BibTeX
@inproceedings{paperbot6406,
  title = {Efficient module-level dynamic analysis for dynamic languages with module recontextualization},
  author = {Nikos Vasilakis and Grigoris Ntousakis and Veit Heller and Martin C. Rinard},
  booktitle = {FSE},
  year = {2021},
  doi = {10.1145/3468264.3468574}
}