Syntax Repair as Language Intersection
Breandan Considine

TL;DR
This paper presents a novel syntax repair technique for context-free languages that models repairs as language intersections, enabling efficient, provably complete, and state-of-the-art syntax error correction.
Contribution
It introduces a new formal language intersection approach for syntax repair, connecting formal language theory with program analysis to improve repair efficiency and completeness.
Findings
Polylogarithmic parallel time decidability for syntax repair
Enumeration algorithm based on Brzozowski derivative
State-of-the-art results on Python syntax repair benchmark
Abstract
We introduce a new technique for repairing syntax errors in arbitrary context-free languages. This technique models syntax repair as a language intersection problem by defining a finite language that provably generates every syntactically valid repair within a given edit distance. Leveraging a theoretical connection between the Bar-Hillel construction from formal language theory and CFL reachability from program analysis, we show that repairability in a finite number of typographic edits is polylogarithmic parallel time decidable and provide an enumeration algorithm based on the Brzozowski derivative. Finally, we evaluate this algorithm and its implementation, demonstrating state-of-the-art results on a Python syntax repair benchmark.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSyntax, Semantics, Linguistic Variation
