paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Fast and precise application code analysis using a partial library

使用部分库的快速且精确的应用代码分析
ICSE Proceedings of the 44th International Conference on Software Engineering2022匹配度 3/10 · 论文属于静态分析与抽象解释,关注应用代码分析中通过部分库选取提升速度并保持精度,但未涉及用户重点关注的 ML/Agentic 程序静态分析、LLM 辅助静态分析、浮点程序分析或贝叶斯程序分析。因此与当前研究画像的核心方向匹配度较低。引用 5 inbox
Akshay Utture, Jens Palsberg
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出 QueryMax,通过选取与应用查询最相关的部分库,在不损失精度的情况下显著加速应用代码静态分析。

全程序静态分析耗时长,是工具广泛采用的关键瓶颈;但用户通常只关心占程序一小部分的应用代码错误。现有面向应用的分析工具往往过近似库的行为,导致精度下降,而用户对精度期望很高,会忽略不满足期望的结果。本文提出首个工具 QueryMax,作为现有分析工具的预处理器,为应用代码中的分析查询选择最相关的部分库。将选中的部分库与应用代码一起输入现有静态分析工具,并把剩余库指针视为抽象域中的底元素。该方法在仅丢失少量错误的前提下,相对全程序分析获得显著加速且不损失精度。作者在类型转换检查和空指针分析上实例化并实验,某配置下平均召回率 87%、精度 100%、几何平均加速 10 倍。

问题
全程序静态分析耗时过长,而现有面向应用代码的分析工具因过近似库行为而降低精度,难以满足用户对高精度的要求。
方法
QueryMax 作为现有分析工具的预处理器,根据应用代码中的分析查询选取最相关的部分库,将其与应用代码一起分析,并把其余库指针当作抽象域底元素处理。
评估
在类型转换检查和空指针分析上实例化 QueryMax,并与全程序分析对比;某配置下达到平均召回率 87%、精度 100%、几何平均加速 10 倍,代价是丢失少量错误且不损失精度。
原文摘要(Abstract)

Long analysis times are a key bottleneck for the widespread adoption of whole-program static analysis tools. Fortunately, however, a user is often only interested in finding errors in the application code, which constitutes a small fraction of the whole program. Current application-focused analysis tools overapproximate the effect of the library and hence reduce the precision of the analysis results. However, empirical studies have shown that users have high expectations on precision and will ignore tool results that don't meet these expectations. In this paper, we introduce the first tool QueryMax that significantly speeds up an application code analysis without dropping any precision. QueryMax acts as a pre-processor to an existing analysis tool to select a partial library that is most relevant to the analysis queries in the application code. The selected partial library plus the application is given as input to the existing static analysis tool, with the remaining library pointers treated as the bottom element in the abstract domain. This achieves a significant speedup over a whole-program analysis, at the cost of a few lost errors, and with no loss in precision. We instantiate and run experiments on QueryMax for a cast-check analysis and a null-pointer analysis. For a particular configuration, QueryMax enables these two analyses to achieve, relative to a whole-program analysis, an average recall of 87%, a precision of 100% and a geometric mean speedup of 10x.

链接与引用

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

BibTeX
@inproceedings{UttureP22,
  title = {Fast and precise application code analysis using a partial library},
  author = {Akshay Utture and Jens Palsberg},
  booktitle = {ICSE},
  year = {2022},
  doi = {10.1145/3510003.3510046}
}