Reducing Cascading Parsing Errors Through Fast Error Recovery

04/19/2018
by   Lukas Diekmann, et al.
0

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 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

READ FULL TEXT

Please sign up or login with your details

Forgot password? Click here to reset