paperbot · PL 论文追踪

全部论文 待读 收藏

P2 OrdinalFix: Fixing Compilation Errors via Shortest-Path CFL Reachability

OrdinalFix:通过最短路径CFL可达性修复编译错误
ASE 2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE)2023匹配度 3/10 · 该论文属于程序分析与自动修复,使用最短路径CFL可达性形式化地修复编译错误,兼具理论保证与工具实现;但未涉及LLM/Agent、浮点程序分析或贝叶斯程序分析,与用户画像的核心交叉方向不匹配。引用 4 inbox
Wenjie Zhang, Guancheng Wang, Junjie Chen, Yingfei Xiong, Yong Liu, Lu Zhang
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:提出基于最短路径CFL可达性的完整算法OrdinalFix,保证以最少修改次数修复编译错误。

编译错误阻碍软件开发,需修复以满足语法和语言约束。神经网络方法缺乏正确性保证且修改次数无界,而在给定修改次数内修复是挑战。作者证明找到最少修改次数修复编译错误是NP-hard。为此提出OrdinalFix,一种基于带属性检查的最短路径CFL(上下文无关语言)可达性的完整算法,保证输出具有最少修改次数的程序。它从最小修改数开始搜索,并通过合并属性检查提升效率,时间复杂度可接受。在两个数据集上评估,OrdinalFix在合理时间内修复错误,成功率达83.5%,超越现有方法(71.7%)。

问题
编译错误修复需保证代码语法正确并满足语言约束;神经网络方法缺乏正确性保证且修改次数无界,而找到最少修改次数的修复被证明是NP-hard问题。
方法
提出OrdinalFix,基于带属性检查的最短路径CFL可达性,从最小修改数开始逐步搜索,并采用合并属性检查提升效率,保证输出最少修改次数的修复。
评估
在两个数据集上评估,OrdinalFix能在合理时间限制内修复编译错误,成功率达到83.5%,超过所有现有方法(71.7%)。
原文摘要(Abstract)

The development of correct and efficient software can be hindered by compilation errors, which must be fixed to ensure the code's syntactic correctness and program language constraints. Neural network-based approaches have been used to tackle this problem, but they lack guarantees of output correctness and can require an unlimited number of modifications. Fixing compilation errors within a given number of modifications is a challenging task. We demonstrate that finding the minimum number of modifications to fix a compilation error is NP-hard. To address compilation error fixing problem, we propose OrdinalFix, a complete algorithm based on shortest-path CFL (context-free language) reachability with attribute checking that is guaranteed to output a program with the minimum number of modifications required. Specifically, OrdinalFix searches possible fixes from the smallest to the largest number of modifications. By incorporating merged attribute checking to enhance efficiency, the time complexity of OrdinalFix is acceptable for application. We evaluate OrdinalFix on two datasets and demonstrate its ability to fix compilation errors within reasonable time limit. Comparing with existing approaches, OrdinalFix achieves a success rate of 83.5 %, surpassing all existing approaches (71.7%).

链接与引用

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

BibTeX
@inproceedings{abs-2309-06771,
  title = {OrdinalFix: Fixing Compilation Errors via Shortest-Path CFL Reachability},
  author = {Wenjie Zhang and Guancheng Wang and Junjie Chen and Yingfei Xiong and Yong Liu and Lu Zhang},
  booktitle = {ASE},
  year = {2023},
  doi = {10.1109/ase56229.2023.00072}
}