{"ID":2893748,"CreatedAt":"2026-06-01T04:54:23.091178241Z","UpdatedAt":"2026-06-01T04:54:23.091178241Z","DeletedAt":null,"paper_url":"https://arxiv.org/abs/2507.11873","arxiv_id":"2507.11873","title":"Syntax Repair as Language Intersection","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.","short_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 be...","url_abs":"https://arxiv.org/abs/2507.11873","url_pdf":"https://arxiv.org/pdf/2507.11873v2","authors":"[\"Breandan Considine\"]","published":"2025-07-16T03:35:32Z","proceeding":"cs.FL","tasks":"[\"cs.FL\",\"cs.PL\"]","methods":"[]","has_code":false}
