paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Using pre-trained language models to resolve textual and semantic merge conflicts (experience paper)

使用预训练语言模型解决文本与语义合并冲突(经验论文)
ISSTA Proceedings of the 31st ACM SIGSOFT International Symposium on Software Testing and Analysis2022匹配度 4/10 · 论文用 k-shot 与 GPT-3 自动修复文本/语义合并冲突,属于 LLM 辅助软件工程/程序修复,与画像中“LLM/Agent 改进静态分析或形式化验证”仅有广义 PL+AI 交集;不涉及静态分析、浮点程序分析、贝叶斯程序分析或 agentic/ML 系统分析。引用 37 inbox
Jialu Zhang, Todd Mytkowicz, Mike Kaufman, Ruzica Piskac, Shuvendu K. Lahiri
crossref: 2026-09-12

AI 速览

一句话:探索用 GPT-3 等预训练语言模型以 k-shot 学习自动修复文本与语义合并冲突。

程序合并失败会产生文本或语义合并冲突,手动解决成本高昂。本文以 Microsoft Edge 为案例,研究使用 GPT-3 等预训练大语言模型和 k-shot 学习自动修复两类冲突的可行性,并处理示例与查询需放入 2048 token 提示的限制。评估结果呈现混合结论:在 Edge 的语义合并冲突上,语言模型相较早期符号方法达到最先进性能;但对于受限模式,语言模型尚未能取代专用领域特定语言(DSL)在程序合成中的优势。

问题
大型代码项目中,文本合并冲突会使合并无法生成代码,语义合并冲突会导致编译错误或测试失败,而手动定位并修复这些冲突代价高昂。论文探究能否自动修复文本与语义合并冲突。
方法
使用 GPT-3 等预训练大语言模型进行 k-shot 学习,将示例和查询压缩到 2048 token 的提示中,针对文本与语义合并冲突生成修复。
评估
在 Microsoft Edge 上评估语言模型与 k-shot 学习,并与早期符号方法和用于受限模式的 DSL 比较。结果显示语言模型在语义合并冲突上达到 SOTA,但尚未能完全取代 DSL 的优势。
原文摘要(Abstract)

Program merging is standard practice when developers integrate their individual changes to a common code base. When the merge algorithm fails, this is called a merge conflict. The conflict either manifests as a textual merge conflict where the merge fails to produce code, or as a semantic merge conflict where the merged code results in compiler errors or broken tests. Resolving these conflicts for large code projects is expensive because it requires developers to manually identify the sources of conflicts and correct them. In this paper, we explore the feasibility of automatically repairing merge conflicts (both textual and semantic) using k-shot learning with pre-trained large neural language models (LM) such as GPT-3. One of the challenges in leveraging such language models is fitting the examples and the queries within a small prompt (2048 tokens). We evaluate LMs and k-shot learning for both textual and semantic merge conflicts for Microsoft Edge. Our results are mixed: on one-hand, LMs provide the state-of-the-art (SOTA) performance on semantic merge conflict resolution for Edge compared to earlier symbolic approaches; on the other hand, LMs do not yet obviate the benefits of special purpose domain-specific languages (DSL) for restricted patterns for program synthesis.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot7404,
  title = {Using pre-trained language models to resolve textual and semantic merge conflicts (experience paper)},
  author = {Jialu Zhang and Todd Mytkowicz and Mike Kaufman and Ruzica Piskac and Shuvendu K. Lahiri},
  booktitle = {ISSTA},
  year = {2022},
  doi = {10.1145/3533767.3534396}
}