paperbot · PL 论文追踪

全部论文 待读 收藏

P2 ConflictJS

ConflictJS:JavaScript 库冲突的自动化分析
ICSE Proceedings of the 40th International Conference on Software Engineering2018匹配度 2/10 · 该论文属于程序分析与测试合成,但研究目标是 JavaScript 库间全局命名空间冲突,与用户核心方向(PL→AI、AI→PL、浮点程序分析、贝叶斯程序分析及其与 LLM 的交叉)没有直接关联;仅在方法上涉及动态分析和定向测试生成。引用 54 inbox
Jibesh Patra, Pooja N. Dixit, Michael Pradel
crossref: 2026-09-12

AI 速览

一句话:提出 ConflictJS,用两阶段动态分析与定向测试合成自动检测 JavaScript 库间全局命名空间冲突。

客户端 Web 应用常依赖多个第三方 JavaScript 库,而 JavaScript 缺少命名空间,导致所有库共享全局命名空间,一个库可能无意修改或删除另一个库的 API,引发客户端异常。为此,作者提出 ConflictJS:首先对单个库进行动态分析,找出可能冲突的库对;再通过定向测试合成生成一个会遭受该冲突的客户端应用,从而验证潜在冲突。该方法不产生假阳性,即只在存在真实受害客户端时报告问题。作者用 ConflictJS 分析了 951 个真实库,发现四分之一库潜在冲突,166 个库至少涉及一个确定冲突,冲突会导致崩溃等意外行为。

问题
JavaScript 库共享全局命名空间,库之间可能无意修改或删除彼此 API,导致客户端行为异常;人工追踪大量库的冲突不可行。
方法
两阶段自动化方法:先用动态分析识别可能冲突的库对,再通过定向测试合成生成遭受冲突的客户端应用来验证。
评估
在 951 个真实 JavaScript 库上分析冲突,发现四分之一库潜在冲突、166 个库涉及确定冲突,并导致崩溃等异常。
原文摘要(Abstract)

It is a common practice for client-side web applications to build on various third-party JavaScript libraries. Due to the lack of namespaces in JavaScript, these libraries all share the same global namespace. As a result, one library may inadvertently modify or even delete the APIs of another library, causing unexpected behavior of library clients. Given the quickly increasing number of libraries, manually keeping track of such conflicts is practically impossible both for library developers and users. This paper presents ConflictJS, an automated and scalable approach to analyze libraries for conflicts. The key idea is to tackle the huge search space of possible conflicts in two phases. At first, a dynamic analysis of individual libraries identifies pairs of potentially conflicting libraries. Then, targeted test synthesis validates potential conflicts by creating a client application that suffers from a conflict. The overall approach is free of false positives, in the sense that it reports a problem only when such a client exists. We use ConflictJS to analyze and study conflicts among 951 real-world libraries. The results show that one out of four libraries is potentially conflicting and that 166 libraries are involved in at least one certain conflict. The detected conflicts cause crashes and other kinds of unexpected behavior. Our work helps library developers to prevent conflicts, library users to avoid combining conflicting libraries, and provides evidence that designing a language without explicit namespaces has undesirable effects.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot4483,
  title = {ConflictJS},
  author = {Jibesh Patra and Pooja N. Dixit and Michael Pradel},
  booktitle = {ICSE},
  year = {2018},
  doi = {10.1145/3180155.3180184}
}