Lune

ASE2023Top-tier venue

OrdinalFix: Fixing Compilation Errors via Shortest-Path CFL Reachability

Wenjie Zhang, Guancheng Wang, Junjie Chen, Yingfei Xiong, Yong Liu, Lu Zhang

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%).

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Break-It-Fix-It: Unsupervised Learning for Program Repair cites Graph-based, Self-Supervised Program Repair from Diagnostic Feedback
  • TransRepair: Context-aware Program Repair for Compilation Errors cites CoCoNuT: combining context-aware neural translation models using ensemble for program repair
  • TransRepair: Context-aware Program Repair for Compilation Errors cites Graph-based, Self-Supervised Program Repair from Diagnostic Feedback
  • A syntax-guided edit decoder for neural program repair cites CoCoNuT: combining context-aware neural translation models using ensemble for program repair
  • A syntax-guided edit decoder for neural program repair cites Graph-based, Self-Supervised Program Repair from Diagnostic Feedback
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on6

  1. CoCoNuT: combining context-aware neural translation models using ensemble for program repairThibaud Lutellier, Hung Viet Pham, Lawrence Pang, Yitong Li et al.ISSTA 2020 · 325 citations
  2. A syntax-guided edit decoder for neural program repairQihao Zhu, Zeyu Sun, Yuan-an Xiao, Wenjie Zhang et al.FSE 2021 · 214 citations
  3. Graph-based, Self-Supervised Program Repair from Diagnostic FeedbackMichihiro Yasunaga, Percy LiangICML 2020 · 198 citations
  4. Break-It-Fix-It: Unsupervised Learning for Program RepairMichihiro Yasunaga, Percy LiangICML 2021 · 128 citations
  5. TransRepair: Context-aware Program Repair for Compilation ErrorsXueyang Li, Shangqing Liu, Ruitao Feng, Guozhu Meng et al.ASE 2022 · 31 citations

Related papers

  1. Neural Program Repair with Execution-based BackpropagationHe Ye, Matias Martinez, Martin MonperrusICSE 2022 · 146 citations
  2. Neurosymbolic Repair of Test FlakinessYang Chen, Reyhaneh JabbarvandISSTA 2024 · 8 citations
  3. ITER: Iterative Neural Repair for Multi-Location PatchesHe Ye, Martin MonperrusICSE 2024 · 39 citations
  4. Treefix: Enabling Execution with a Tree of PrefixesBeatriz Souza, Michael PradelICSE 2025
  5. CURE: Code-Aware Neural Machine Translation for Automatic Program RepairNan Jiang, Thibaud Lutellier, Lin TanICSE 2021 · 267 citations
Dusk over the sea between two cliffs drawn in fine vertical lines