跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 形式语言与自动机理论

arXiv:2608.03473 (cs)
[提交于 2026年8月4日 (v1),最后修订于 2026年11月22日 (此版本, v5)]

标题:Certified Split Points for Parallel Lexing: Exact and Modulo Discarded Tokens

作者:Nicklas Nidhögg
查看论文《Certified Split Points for Parallel Lexing: Exact and Modulo Discarded Tokens》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:Table-driven DFA lexing is sequential, since each transition depends on the previous byte's state. Scanning one input in parallel needs each chunk's entry state, which existing methods recover by simulation, speculation, prescanning, or overlap. We give two conditions under which none is needed. For a longest-match scanner restarting from q0 at every token boundary, a byte b is a certified split symbol when no reachable state other than q0 has a b-transition whose target can reach acceptance, and q0 is not re-entrant if it has one. Every occurrence of such a byte in completely tokenizable input begins a token, so chunks starting there reproduce the serial sequence of kinds and lengths. The condition is necessary and sufficient, but one string, comment, or whitespace run can remove every useful certificate. Comments and whitespace are usually discarded, so we weaken the guarantee to equality after deleting a declared discarded set and give a second condition, a precomputed constant-time one-bit test. It is sound but incomplete and more permissive, strictly so on suitable token and discarded sets. It recovers newline for a conventional C-like tokenization and tab, newline and carriage return for JSON, and refuses newline where block comments are unrestricted. Safety modulo the discarded set is PSPACE-complete for general token automata and decidable in polynomial time for literal vocabularies, and every unsafe byte has a replayable counterexample. On the fifteen token sets studied the second condition is already exact. Splitting at exact certificates in munch reaches 92.6-95.3% parallel efficiency at eight threads on a restricted CPU set and a 512 MiB corpus, and a 3.46-3.94x end-to-end speedup at four threads, on one machine. It turns delimiter-based parallel lexing from a language-specific assumption into a property a compiler checks.
评论: 52 pages, 2 figures, 4 tables. v5: proves safety modulo discarded tokens PSPACE-complete, already over three symbols, and that automata for the completely tokenizable inputs can need exponentially many states. Artifact: https://doi.org/10.5281/zenodo.24220471 . Certificate tables, composition figures and the validation sweep are generated from the compiled automata and asserted in CI
主题: 形式语言与自动机理论 (cs.FL); 分布式、并行与集群计算 (cs.DC); 程序设计语言 (cs.PL)
引用方式: arXiv:2608.03473 [cs.FL]
  (或者 arXiv:2608.03473v5 [cs.FL] 对于此版本)
  https://doi.org/10.48550/arXiv.2608.03473

提交历史

来自:Nicklas Nidhögg
[v1] 2026年8月4日 星期二 11:13:13 UTC (59 KB)
[v2] 2026年8月18日 星期二 16:43:25 UTC (61 KB)
[v3] 2026年9月16日 星期三 17:19:35 UTC (68 KB)
[v4] 2026年10月25日 星期日 19:39:14 UTC (80 KB)
[v5] 2026年11月22日 星期日 12:03:47 UTC (94 KB)
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs.FL
< 上一篇   |   下一篇 >
最新 | 近期 | 2026-11
切换浏览方式为:
cs
cs.DC
cs.PL

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站