paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Seq2Parse: neurosymbolic parse error repair

Seq2Parse:神经符号式的解析错误修复
OOPSLA 6(OOPSLA2)2022匹配度 4/10 · 论文属于神经符号方法在程序语言/解析错误修复中的应用,与 PL+AI 交叉有一定关联;但它不涉及用户核心关注的静态分析/形式化验证、LLM/Agent 工具,也不涉及浮点或贝叶斯程序分析,且使用传统序列分类器而非当前强模型,因此匹配有限。引用 5 inbox
Georgios Sakkas, Madeline Endres, Philip J. Guo, Westley Weimer, Ranjit Jhala
crossref: 2026-09-10

AI 速览

一句话:结合神经网络预测相关纠错规则与符号纠错解析器,自动修复解析错误。

论文研究自动修复程序解析错误的问题。符号纠错解析器理论上可合成修复,但实践中会被大量与当前程序无关的纠错规则淹没;神经方法虽常受限于可能的序列级编辑空间,却能精确定位与特定程序相关的纠错规则。Seq2Parse 将二者互补优势结合:先用神经方法训练序列分类器,为解析失败的程序预测一小组相关纠错规则,再由符号纠错解析算法快速生成有用修复。作者在包含 110 万个 Python 程序的数据集上训练与评估,表明该方法准确且高效:94% 的测试可在 2.1 秒内解析,三分之一的案例能生成与用户修复完全一致的结果;人类评估也显示,Seq2Parse 生成的错误位置与修复在统计显著意义上接近人类生成质量。

问题
如何语言无关地自动修复解析错误,并克服符号纠错解析器规则空间过大与神经方法编辑空间过大的各自局限。
方法
训练神经序列分类器预测与待修复程序相关的少量纠错规则,再交由符号纠错解析算法生成具体修复。
评估
在 110 万个 Python 程序数据集上评估解析成功率、耗时与精确修复率,并开展人类感知研究比较其错误位置与修复质量。
原文摘要(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.

链接与引用

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

BibTeX
@article{paperbot1417,
  title = {Seq2Parse: neurosymbolic parse error repair},
  author = {Georgios Sakkas and Madeline Endres and Philip J. Guo and Westley Weimer and Ranjit Jhala},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {6},
  number = {OOPSLA2},
  year = {2022},
  doi = {10.1145/3563330}
}