paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Inferring Program Transformations From Singular Examples via Big Code

借助 Big Code 从单一示例推断程序变换
ASE 2019 34th IEEE/ACM International Conference on Automated Software Engineering (ASE)2019匹配度 3/10 · 该论文研究从单个示例推断程序变换,使用大代码统计而非LLM/Agent,与用户关注的静态分析、Agentic程序、浮点/贝叶斯程序分析及LLM交叉方向均无直接关联;仅在程序修复与变换这一广义PL/SE主题上略有交集,但缺乏用户核心的LLM/Agent与静态分析要素。引用 73 inbox
Jiajun Jiang, Luyao Ren, Yingfei Xiong, Lingming Zhang
crossref: 2026-09-12

AI 速览

一句话:提出 GENPAT,利用大代码统计与代码上下文,从单个程序变更示例推断通用程序变换,并验证于系统化编辑与修复。

从具体程序变更推断程序变换可用于系统化编辑、重构和自动修复,但现有方法多依赖大量变更示例。本文研究仅凭单个示例推断变换,核心洞察是 Big Code 可指导泛化:频繁出现的代码元素更通用,不应被抽象。方法用超图表示程序以支持细粒度泛化,并设计 GENPAT,结合代码上下文和大代码统计推断变换。评估覆盖系统化编辑与程序修复:系统化编辑中正确变换案例比 SYDIT 最多提升 5.5 倍;在 Defects4J 上通过已有补丁推断的变换修复 19 个真实 bug,其中 4 个此前无技术可修。结果表明该方法有效且具广泛适用潜力。

问题
如何仅从单个程序变更示例推断出可泛化的程序变换,而不过度依赖大量示例的统计信息。
方法
将程序表示为超图,并设计 GENPAT,利用代码上下文与 Big Code 语料统计指导变换泛化。
评估
在系统化编辑和程序修复两个场景评估:与 SYDIT 对比正确变换数最多提升 5.5 倍,并在 Defects4J 上修复 19 个真实 bug,其中 4 个为新修复。
原文摘要(Abstract)

Inferring program transformations from concrete program changes has many potential uses, such as applying systematic program edits, refactoring, and automated program repair. Existing work for inferring program transformations usually rely on statistical information over a potentially large set of program-change examples. However, in many practical scenarios we do not have such a large set of program-change examples. In this paper, we address the challenge of inferring a program transformation from one single example. Our core insight is that "big code" can provide effective guide for the generalization of a concrete change into a program transformation, i.e., code elements appearing in many files are general and should not be abstracted away. We first propose a framework for transformation inference, where programs are represented as hypergraphs to enable fine-grained generalization of transformations. We then design a transformation inference approach, GENPAT, that infers a program transformation based on code context and statistics from a big code corpus. We have evaluated GENPAT under two distinct application scenarios, systematic editing and program repair. The evaluation on systematic editing shows that GENPAT significantly outperforms a state-of-the-art approach, SYDIT, with up to 5.5x correctly transformed cases. The evaluation on program repair suggests that GENPAT has the potential to be integrated in advanced program repair tools-GENPAT successfully repaired 19 real-world bugs in the Defects4J benchmark by simply applying transformations inferred from existing patches, where 4 bugs have never been repaired by any existing technique. Overall, the evaluation results suggest that GENPAT is effective for transformation inference and can potentially be adopted for many different applications.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot5226,
  title = {Inferring Program Transformations From Singular Examples via Big Code},
  author = {Jiajun Jiang and Luyao Ren and Yingfei Xiong and Lingming Zhang},
  booktitle = {ASE},
  year = {2019},
  doi = {10.1109/ase.2019.00033}
}