Lune

OOPSLA2022Top-tier venue

Seq2Parse: neurosymbolic parse error repair

Georgios Sakkas, Madeline Endres, Philip J. Guo, Westley Weimer, Ranjit Jhala

Abstract

We present Seq2Parse, a language-agnostic neurosymbolic approach to automatically repairing parse errors. Seq2Parse is based on the insight that Symbolic Error Correcting (EC) Parsers can, in principle, synthesize repairs, but, in practice, are overwhelmed by the many error-correction rules that are not relevant to the particular program that requires repair. In contrast, Neural approaches are fooled by the large space of possible sequence level edits, but can precisely pinpoint the set of EC-rules that are relevant to a particular program. We show how to combine their complementary strengths by using neural methods to train a sequence classifier that predicts the small set of relevant EC-rules for an ill-parsed program, after which, the symbolic EC-parsing algorithm can make short work of generating useful repairs. We train and evaluate our method on a dataset of 1,100,000 Python programs, and show that Seq2Parse is accurate and efficient : it can parse 94% of our tests within 2.1 seconds, while generating the exact user fix in 1 out 3 of the cases; and useful : humans perceive both Seq2Parse-generated error locations and repairs to be almost as good as human-generated ones in a statistically-significant manner.

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.

3 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • RepairAgent: An Autonomous, LLM-Based Agent for Program Repair cites CoCoNuT: combining context-aware neural translation models using ensemble for program repair
  • Semantic programming by example with pre-trained models cites Language Models are Few-Shot Learners
  • LLM-Based Repair of Static Nullability Errors cites CoCoNuT: combining context-aware neural translation models using ensemble for program repair
  • LLM-Based Repair of Static Nullability Errors cites RepairAgent: An Autonomous, LLM-Based Agent for Program Repair
  • Multi-modal program inference: a marriage of pre-trained language models and component-based synthesis cites Language Models are Few-Shot Learners
  • CURE: Code-Aware Neural Machine Translation for Automatic Program Repair cites CoCoNuT: combining context-aware neural translation models using ensemble for program repair
  • OrdinalFix: Fixing Compilation Errors via Shortest-Path CFL Reachability cites CoCoNuT: combining context-aware neural translation models using ensemble for program repair
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. RepairAgent: An Autonomous, LLM-Based Agent for Program RepairIslem Bouzenia, Premkumar T. Devanbu, Michael PradelICSE 2025 · 54 citations
  2. OrdinalFix: Fixing Compilation Errors via Shortest-Path CFL ReachabilityWenjie Zhang, Guancheng Wang, Junjie Chen, Yingfei Xiong et al.ASE 2023 · 4 citations
  3. LLM-Based Repair of Static Nullability ErrorsNima Karimipour, Pascal Joos, Michael Pradel, Martin Kellogg et al.ISSTA 2026

Builds on6

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. 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
  3. CURE: Code-Aware Neural Machine Translation for Automatic Program RepairNan Jiang, Thibaud Lutellier, Lin TanICSE 2021 · 267 citations
  4. Multi-modal program inference: a marriage of pre-trained language models and component-based synthesisKia Rahmani, Mohammad Raza, Sumit Gulwani, Vu Le et al.OOPSLA 2021 · 32 citations
  5. Semantic programming by example with pre-trained modelsGust Verbruggen, Vu Le, Sumit GulwaniOOPSLA 2021 · 26 citations

Related papers

  1. Structural generalization is hard for sequence-to-sequence modelsYuekun Yao, Alexander KollerEMNLP 2022 · 8 citations
  2. PyDex: Repairing Bugs in Introductory Python Assignments using LLMsJialu Zhang, José Pablo Cambronero, Sumit Gulwani, Vu Le et al.OOPSLA 2024 · 38 citations
  3. Neurosymbolic Repair of Test FlakinessYang Chen, Reyhaneh JabbarvandISSTA 2024 · 8 citations
  4. Dataflow-Guided Neuro-Symbolic Language Models for Type InferenceGe Li, Yao Wan, Hongyu Zhang, Zhou Zhao et al.ICML 2025
  5. Break-It-Fix-It: Unsupervised Learning for Program RepairMichihiro Yasunaga, Percy LiangICML 2021 · 128 citations
Dusk over the sea between two cliffs drawn in fine vertical lines