[论文解读] Reducing Cascading Parsing Errors Through Fast Error Recovery.
本文提出了一种快速、实用的解析器错误恢复技术,通过计算完整的最小代价修复序列来减少级联错误。使用一种名为MF的优化算法,该技术在每文件0.5秒内实现了98.74%的修复率,使20万份真实世界Java程序语料中的最坏情况级联错误减少了32.27%。
Syntax errors are generally easy to fix for humans, but not for parsers: the latter often fail to find an effective recovery, leading to a cascading chain of errors that drown out the original. More advanced recovery techniques suffer less from this problem but have seen little practical use because their typical performance was seen as poor and their worst case unbounded. In this paper we show that not only can an advanced approach run in acceptable time -- which we define as spending a maximum of 0.5s in error recovery per file -- but that we can find the complete set of minimum cost repair sequences within acceptable time. We then use the existence of the complete set of minimum cost repair sequences to further reduce the cascading error problem. We first extend Corchuelo et al.'s algorithm, before introducing a new, faster, alternative called MF. We validate our algorithms with a corpus of 200,000 real-world syntactically invalid Java programs: MF is able to repair 98.74% of files within acceptable time. By making use of the complete set of repair sequences, we show that the worst case for cascading errors is reduced by 32.27%.
研究动机与目标
- 为解决级联解析错误问题,此类错误会掩盖原始语法错误并阻碍程序调试。
- 开发一种实用的错误恢复方法,确保运行时间在可接受范围内——具体而言,每文件不超过0.5秒。
- 计算完整的最小代价修复序列集合,以提高恢复准确性并减少错误传播。
- 在包含20万份真实世界语法无效Java程序的语料上验证该方法。
提出的方法
- 扩展Corchuelo等人提出的算法,以支持完整最小代价修复序列的计算。
- 提出一种新型、更快速的算法MF,专为性能和可扩展性进行优化。
- 实现一种基于代价的修复模型,优先考虑最小的语法修改以恢复有效性。
- 使用20万份真实世界无效Java程序的语料作为基准,评估性能和修复效果。
- 通过比较修复前后级联错误数量,测量恢复时间和错误减少程度。
- 应用完整的最小代价修复序列集合,以最小化下游解析中的错误传播。
实验结果
研究问题
- RQ1通过确保每文件恢复时间不超过0.5秒,是否可以使高级错误恢复技术变得实用?
- RQ2在真实程序中,是否可行于可接受时间内计算出完整的最小代价修复序列集合?
- RQ3完整的修复序列集合在多大程度上能够减少级联解析错误?
- RQ4所提出的MF算法在修复真实世界语法无效Java程序方面的有效性如何?
主要发现
- MF算法在0.5秒时间限制内成功修复了20万份真实世界无效Java程序中的98.74%。
- 完整的最小代价修复序列集合使最坏情况下的级联解析错误数量减少了32.27%。
- 所提出的方法在保持高性能的同时,显著提高了传统技术的恢复准确性。
- Corchuelo等人算法的扩展使得在可接受计算成本下实现了最小代价修复的完整枚举。
- 结果表明,当针对真实世界应用进行优化时,高级错误恢复技术可以既高效又有效。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。