paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Static Analysis for Efficient Streaming Tokenization

面向高效流式 tokenization 的静态分析
ASPLOS Proceedings of the 31st ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 22026匹配度 2/10 · 论文属于编译/静态分析领域的流式词法分析优化,核心是分词文法识别与算法实现,未涉及用户重点关注的 ML/Agentic 程序、LLM 与静态分析结合、浮点程序分析或贝叶斯程序分析。与画像仅有“静态分析”这一宽泛联系,匹配度低。引用 3 inbox
Angela W. Li, Yudi Yang, Konstantinos Mamouras
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出识别难处理分词文法的静态分析,并据此实现流式分词算法 StreamTok,性能优于现有工具。

Tokenization(词法分析/扫描)是编译、自然语言处理以及 JSON、CSV、XML 等半结构化数据处理的基础步骤。分词器通常由一组正则表达式给出的分词文法指定,并采用最长匹配策略消解歧义。由于大规模半结构化数据难以全部载入内存,流式低内存分词变得十分重要。论文首先观察到某些分词文法本质上更难处理,并提出静态分析算法来识别它们;随后基于该分析提出 StreamTok 流式分词算法。StreamTok 在渐近复杂度上优于 flex 的标准算法。实验结果表明,StreamTok 的实现优于当前最先进的分词工具。

问题
如何在大规模数据场景下以低内存流式方式高效执行采用最长匹配语义的分词,并识别不同分词文法的处理难度差异。
方法
提出一种静态分析算法来识别难处理的分词文法,并基于该分析设计流式分词算法 StreamTok。
评估
从渐近复杂度上与 flex 标准算法比较,并通过实验实现与当前最先进分词工具进行性能对比。
原文摘要(Abstract)

Tokenization, also referred to as lexing or scanning, is the computational task of partitioning an input text into a sequence of substrings called tokens. Tokenization is one of the first stages of program compilation, it is used in natural language processing, and it is also useful for processing unstructured text or semi-structured data such as JSON, CSV, and XML. A tokenizer is typically specified as a list of regular expressions, which is called a tokenization grammar. Each regular expression describes a class of tokens (e.g., integer, floating-point number, variable identifier, string literal). The semantics of tokenization employs the longest match policy to disambiguate among the possible choices. This policy says that we should prefer a longer token over a shorter one. It is also known as the maximal munch policy. Tokenization is an important computational task when processing semi-structured data, as it often precedes parsing, querying, or data transformations. Due to the abundance of large-scale semi-structured data, which can be too large to load in memory, it is desirable to perform tokenization in a streaming fashion with a small memory footprint. First, we observe that some tokenization grammars are inherently more difficult to deal with than others, and we provide a static analysis algorithm for recognizing them. We continue to propose the StreamTok algorithm, which relies on this analysis to enable efficient tokenization. StreamTok is asymptotically better than the standard algorithm of flex. Our experimental results show that our implementation of StreamTok outperforms state-of-the-art tools for tokenization.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@inproceedings{LiYM26,
  title = {Static Analysis for Efficient Streaming Tokenization},
  author = {Angela W. Li and Yudi Yang and Konstantinos Mamouras},
  booktitle = {ASPLOS},
  year = {2026},
  doi = {10.1145/3779212.3790227}
}