paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Reasonably-Most-General Clients for JavaScript Library Analysis

JavaScript 库分析的合理最通用客户端
ICSE 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE)2019匹配度 3/10 · 该论文属于程序分析与抽象解释,但研究对象是 JavaScript 库的 TypeScript 声明文件类型错误,未涉及用户核心方向中的 LLM/Agent × 静态分析、浮点程序分析或贝叶斯程序分析。引用 12 inbox
Erik Krogh Kristensen, Anders Moller
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出“合理最通用客户端”概念并实现 REAGENT,检测 JavaScript 库 TypeScript 声明文件中的类型错误。

静态分析库代码时若无法获取客户端代码,常规做法是用最通用客户端抽象建模所有可能客户端。但在 JavaScript 等动态语言中,最通用客户端过于宽泛,可能以库开发者未预期且实际客户端不会采用的方式交互,导致分析结果无用。本文提出“合理最通用客户端”概念,并实现静态分析工具 REAGENT,用于检测 JavaScript 库的 TypeScript 声明文件中的错误。作者将多种合理最通用客户端变体集成到现有 JavaScript 静态分析器中,研究不同客户端行为假设对分析结果的影响。实验表明,REAGENT 能在真实 TypeScript 声明文件中发现类型错误,且在错误修正后,可保证相对于所选假设不再存在剩余错误。

问题
在无法获取客户端代码的情况下,如何为 JavaScript 库的静态分析建模客户端行为,既保持足够通用性以发现 TypeScript 声明文件中的类型错误,又避免过度泛化导致无效分析结果。
方法
提出 reasonably-most-general client 概念,并在工具 REAGENT 中将其多种变体集成到现有 JavaScript 静态分析器,通过改变客户端行为假设来观察分析结果的变化。
评估
在真实世界的 TypeScript 声明文件上评估 REAGENT,展示其发现类型错误的能力,并验证错误修正后相对所选假设不存在剩余错误。
原文摘要(Abstract)

A well-known approach to statically analyze libraries without having access to their client code is to model all possible clients abstractly using a most-general client. In dynamic languages, however, a most-general client would be too general: it may interact with the library in ways that are not intended by the library developer and are not realistic in actual clients, resulting in useless analysis results. In this work, we explore the concept of a reasonably-most-general client, in the context of a new static analysis tool REAGENT that aims to detect errors in TypeScript declaration files for JavaScript libraries. By incorporating different variations of reasonably-most-general clients into an existing static analyzer for JavaScript, we use REAGENT to study how different assumptions of client behavior affect the analysis results. We also show how REAGENT is able to find type errors in real-world TypeScript declaration files, and, once the errors have been corrected, to guarantee that no remaining errors exist relative to the selected assumptions.

链接与引用

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

BibTeX
@inproceedings{KristensenM19,
  title = {Reasonably-Most-General Clients for JavaScript Library Analysis},
  author = {Erik Krogh Kristensen and Anders Moller},
  booktitle = {ICSE},
  year = {2019},
  doi = {10.1109/icse.2019.00026}
}