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

并行词法分析的已认证分割窗口:在无字节认证处恢复边界

Certified Split Windows for Parallel Lexing: Recovering Boundaries Where No Byte Certifies

Nicklas Nidhögg

AI总结:

该研究将并行词法分析的已认证分割点推广到有界窗口,提出保守模型并验证其正确性,实验显示多数无法认证字节的词法单元集可获得带见证窗口,与已部署扫描器无分歧。

AI中文摘要:

已认证分割点可让并行词法分析器在单个字节处切割未词法分析的输入,同时串行词法单元流可被保证保持不变,但在前期受控研究中,当包含字符串、注释或空白序列形式时,多个常规词法单元集无法认证任何字节(arXiv:2608.03473)。我们将范围从字节推广到有界窗口:即一段字节串,无论周围上下文如何,当前词法单元起始位置在该字节串之后是已知的。我们认证该恢复的直接可用形式:覆盖窗口最后一个字节的词法单元从报告的起始位置开始。该认证是基于出现的,可能是空的;每个适用性数字仅统计携带断言的完全可词法分析出现见证的窗口。我们给出最大匹配扫描器在一个窗口内可能历史的保守模型,证明其正确性,并通过穷举其可达配置的有限商来精确判定该模型中的可达性,因此无预算限制的过程的每个答案要么是带有其起始位置的已认证窗口,要么是模型不允许任何窗口的证明。在规定的平坦、非空、完全可词法分析范围内,模型肯定答案是语义认证;否定答案是相对于保守模型的,该模型故意拒绝一些贪心扫描器会允许的窗口。在400个随机词法单元集的样本中,95个非空集中有91个无法认证任何字节的集获得了带见证的窗口,且无不确定搜索,前期研究的每个完全空行都获得了2至4字节的带见证窗口。回压测试行执行了1,079,392次扫描窗口且至少包含一次回退的运行,与已部署的扫描器无分歧。该分析在自动机构建后运行一次,仅使用编译后的表,不使用任何输入。

英文摘要:

A certified split point lets a parallel lexer cut unlexed input at a single byte with the serial token stream provably preserved, but several conventional token sets in the predecessor's controlled study certify no byte once string, comment, or whitespace-run forms are included (arXiv:2608.03473). We generalize from a byte to a bounded window: a byte string after which the position where the current token began is known, regardless of surrounding context. We certify the directly usable form of that recovery: the token covering the window's final byte begins at the reported origin. The certificate is conditional on occurrence and may be vacuous; every applicability figure counts only windows carrying an asserted completely tokenizable occurrence witness. We give a conservative model of a maximal-munch scanner's possible histories across a window, prove it sound, and decide reachability in that model exactly by exhausting a finite quotient of its reachable configurations, so every answer of the unbudgeted procedure is either a certified window with its origin or a proof that the model admits none. Within the stated flat, completely-tokenizable scope, model-positive answers are semantic certificates; negatives are relative to the conservative model, which deliberately refuses some windows a greedy scanner would allow. A token set in which some token matches the empty string is decided through its positive-width equivalent, the same automaton entered through a start state that does not accept, which changes no scan. In a sample of 400 random token sets, 322 of the 337 sets certifying no byte gain a witnessed window, with zero inconclusive searches, and every exact-empty row of the predecessor's study gains a witnessed window of two to four bytes. The analysis runs once after automaton construction, using only the compiled tables and no input.

补充信息

↑