paperbot · PL 论文追踪

全部论文 待读 收藏

P2 MetPurity

MetPurity:基于学习的纯方法识别
ASE Proceedings of the 35th IEEE/ACM International Conference on Automated Software Engineering2020匹配度 4/10 · 论文属于机器学习辅助程序分析(用随机森林预测方法纯度),与 PL+AI 的广义交叉相关;但用户核心关注的是 LLM/Agent 与静态分析/形式化验证的结合、浮点或贝叶斯程序分析,本文不涉及这些方向。引用 3 inbox
Runze Yu, Youzhe Zhang, Jifeng Xuan
crossref: 2026-09-12

AI 速览

一句话:提出基于随机森林的纯方法识别工具 MetPurity,用程序分析自动标注训练集并预测未知方法纯度。

在面向对象程序中,若调用方法不改变调用前已存在对象状态,则该方法为纯方法。纯方法可用于测试生成、编译优化和程序修复,但受源码依赖影响,完全准确识别不可行,现有 ReImInfer 等只能识别部分精确结果并将其余标为未知。本文设计并实现 MetPurity:先对项目内方法用自动程序分析生成带标签训练集,再训练随机森林二分类器,预测同一项目中未知方法的纯度。在四个开源 Java 项目上的初步评估表明,MetPurity 能以较低错误率给出纯方法列表,并用于 EvoSuite 后增加回归测试生成的断言数量。

问题
纯方法识别因源码依赖难以完全准确,现有分析只能给出部分精确结果,其余方法标为未知。
方法
MetPurity 通过自动程序分析标注训练集,训练随机森林二分类器,预测同一项目中的未知方法是否纯。
评估
在四个开源 Java 项目上评估识别错误率,并将结果用于 EvoSuite 测试生成,观察回归测试断言数量变化。
原文摘要(Abstract)

In object-oriented programming, a method is pure if calling the method does not change object states that exist in the pre-states of the method call. Pure methods are widely-used in automatic techniques, including test generation, compiler optimization, and program repair. Due to the source code dependency, it is infeasible to completely and accurately identify all pure methods. Instead, existing techniques such as ReImInfer are designed to identify a subset of accurate results of pure method and mark the other methods as unknown ones. In this paper, we designed and implemented MetPurity, a learning-based tool of pure method identification. Given all methods in a project, MetPurity labels a training set via automatic program analysis and builds a binary classifier (implemented with the random forest classifier) based on the training set. This classifier is used to predict the purity of all the other methods (i.e., unknown ones) in the same project. Preliminary evaluation on four open-source Java projects shows that MetPurity can provide a list of identified pure methods with a low error rate. Applying MetPurity to EvoSuite can increase the number of generated assertions for regression testing in test generation by EvoSuite.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot5996,
  title = {MetPurity},
  author = {Runze Yu and Youzhe Zhang and Jifeng Xuan},
  booktitle = {ASE},
  year = {2020},
  doi = {10.1145/3324884.3415292}
}