arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2609.10600cs.PL

认证恐慌模式:用于最大吞噬词法分析的修复不变错误恢复

Certified Panic Mode: Repair-Invariant Error Recovery for Maximal-Munch Lexing

Nicklas Nidhögg

AI总结:

本文提出认证恐慌模式,通过证书证据选择恢复点,保证修复不变的词法边界,并在munch库中实现,实验验证了其恢复质量。

AI中文摘要:

经典恐慌模式恢复通过约定跳过失败的扫描向前推进:它承诺进展,以及在找到恢复点的指定集合中的成员资格,但对其落点位置没有修复普适的边界保证。本文通过定理选择恢复位置:当每个前缀修复的扫描通过证书返回的证据提交时,该位置放置一个词法边界,则此位置是可靠的恢复点;完整修复是特殊情况,通过针对不同目的发布的证书上的已提交前缀引理(arXiv:2608.03473, arXiv:2608.09761)来处理。该量词严格更强,二分法精确定位了差异:当没有修复完成而某些扫描仍通过证据提交时,包含关系严格成立,此时一个双词符见证实现了该情况。返回证据的形式将每个答案与其所依赖的区间配对,这使得保证可部署:知道扫描器无法检查什么的调用者决定认证边界是否转移到其预期的干净输入。搜索是按证据顺序的一次向前遍历,并且可证明终止;保证是逐自动机的,相对于活动模式。该过程已发布在munch词法分析库中,一项确定性损坏研究测量了其恢复质量,与经典跳过一个和分隔符约定相比。每个证据在损坏中幸存的认证答案都通过其可执行落点检查,在所有恢复移动中,40,885个中的40,885个;在首个答案中,5,595个依赖于损坏触及的证据,其中1,589次落地,已报告但未断言。在16,808次试验中的13,522次中,已发布的修复例程标记为无法修复,恢复的后缀完整分词,两个量词可证明重合,因此如果这些负面标签准确,则两者在那里都为空;3,286个仍未确定。

英文摘要:

Classical panic-mode recovery skips a failed scan forward by convention: it promises progress, and membership in a designated set where one is found, but no repair-universal boundary guarantee for the position it lands on. This paper chooses the resume position by theorem: a position is a sound recovery point when every prefix repair whose scan commits through the certificate's returned evidence places a token boundary there, complete repairs the special case, by a committed-prefix lemma over certificates posted for a different purpose (arXiv:2608.03473, arXiv:2608.09761). The quantifier is strictly the stronger one, and a dichotomy locates the difference exactly: the inclusion is strict precisely when no repair completes while some scan still commits through the evidence, a two-token witness realizing the case. The evidence-returning form pairs each answer with the interval it rests on, which is what makes the guarantee deployable: a caller who knows what the scanner cannot check decides whether the certified boundary transfers to the clean input it intended. The search is one forward walk in evidence order and provably terminates; the guarantee is per-automaton, relative to the active mode. The procedure ships in the munch lexing library, and a deterministic corruption study measures its recovery quality beside the classical skip-one and delimiter conventions. Every certified answer whose evidence survives the damage passes its executable landing check on every recovery move, 40,885 of 40,885; among first answers, the 5,595 resting on evidence the damage reached land 1,589 times, reported and never asserted. On 13,522 of the 16,808 trials the shipped repair routine labels beyond repair, the resumed suffix tokenizes whole and the two quantifiers provably coincide, so both are empty there if those negative labels are exact; 3,286 stay undetermined.

补充信息

↑