paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Semistructured Merge with Language-Specific Syntactic Separators

使用语言特定语法分隔符的半结构化合并
ASE Proceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering2024匹配度 2/10 · 论文属于软件工程中的代码合并与开发者工具方向,虽涉及程序语法结构,但不涉及静态分析、形式化验证、LLM/Agent 改进分析,也不属于浮点程序分析或贝叶斯程序分析,与研究画像核心方向基本无关。引用 1 inbox
Guilherme Cavalcanti, Paulo Borba, Leonardo dos Anjos, Jonatas Clementino
crossref: 2026-09-12

AI 速览

一句话:提出一种利用语言特定语法分隔符推断结构、无需解析的半结构化合并工具,显著减少伪冲突。

问题:半结构化合并用部分 AST 表示高层结构,将低层结构交给非结构化工具合并,虽降低实现难度与开销,却损失合并精度。方法:本文提出利用语言特定语法分隔符(如花括号)推断结构,无需解析;先预处理代码使分隔符间文本分行,再交给非结构化工具合并,从而模拟结构化合并并规避其缺点。评估:与成熟半结构化合并实现及常用非结构化工具对比,该工具大幅减少伪冲突,并显著减少总冲突数与含冲突文件数,但与结构化工具类似会漏检更多真实冲突;同时,利用语言特定语法分隔符带来独特的文本对齐挑战。

问题
半结构化合并因使用部分 AST 而损失合并精度,结构化合并又难实现且计算开销大。
方法
提出利用语言特定语法分隔符预处理代码以推断结构、无需解析,再借助非结构化工具合并低层结构。
评估
与成熟半结构化合并实现和常用非结构化工具对比,度量伪冲突、总冲突、含冲突文件及漏检冲突,并讨论文本对齐挑战。
原文摘要(Abstract)

Structured merge tools exploit programming language syntactic structure to enhance merge accuracy by reducing spurious conflicts reported by unstructured tools. By creating and handling full ASTs, structured tools are language-specific and harder to implement. They can also be computationally expensive when merging large files. To reduce these drawbacks, semistructured merge tools work with partial ASTs that use strings to represent lower level syntactic structures such as method bodies, and rely on unstructured tools to merge them. This, however, results in merge accuracy loss. To improve accuracy without compromising semistructured merge benefits, we propose a tool that leverages language-specific syntactic separators to infer structure without parsing. We still resort to an unstructured tool to merge lower level structures, but only after preprocessing the code so that text in between separators such as curly braces appear in separate lines. This way we emulate the capabilities of structured merge tools while avoiding their drawbacks. By comparing our tool with a robust implementation of semistructured merge, we find that our tool substantially reduces the number of spurious conflicts. We also observe significant but less substantial reductions on the overall number of reported conflicts, and of files with conflicts. However, similar to structured tools, our tool lets more merge conflicts go undetected. Our tool shows significant improvements over unstructured tools widely used in practice. Finally we observe that exploiting language-specific syntactic separators introduces unique textual alignment challenges.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot8269,
  title = {Semistructured Merge with Language-Specific Syntactic Separators},
  author = {Guilherme Cavalcanti and Paulo Borba and Leonardo dos Anjos and Jonatas Clementino},
  booktitle = {ASE},
  year = {2024},
  doi = {10.1145/3691620.3695483}
}