AI 中文总结
本文针对纯同步正则表达式和全同步正则表达式提出指称语义,证明带反向引用的正则表达式可转换为全同步正则表达式,且匹配问题为NP完全,还分析了这类语言的封闭性及与其他模型的关系。
AI 中文摘要
纯同步正则表达式(pure sregex)和全同步正则表达式(full sregex)通过在运算符(Kleene星号和选择)上添加标签扩展了正则表达式,同一作用域内相同标签的运算符会同步。我们证明,带有反向引用(实际正则表达式引擎中已知)的正则表达式可转换为full sregex,此前研究未考虑同步选择或嵌套星号同步。同一作用域内,相同标签的星号匹配相同迭代次数,相同标签的选择匹配相同选择,作用域可能依赖外层星号的当前迭代;pure sregex将同步限制在局部作用域,full sregex则允许跨迭代同步。与此前反向引用研究中的操作语义不同,我们提出了一种指称语义,其中具体化类似逻辑中的赋值。与反向引用情况类似,我们证明单词匹配问题是NP完全的。我们还研究了纯同步和全同步语言,证明它们在连接、并和星号运算下是封闭的,并通过泵引理证明它们在交运算下不封闭,同时讨论了它们与其他语言模型的关系。
英文摘要
Pure and full synchronized regular expressions (pure sregex and full sregex ) extend regular expressions by adding labels to the operators (Kleene star and alternation). Operators within the same scope are synchronized if they have the same label. We show that a regular expression with backreferences (known from practical regex engines) can be translated into a full sregex. Previous work did not consider synchronized alternations or nested star synchronization. Within the same scope, stars with the same label match the same number of iterations, alternations with the same label match the same choice. The scope may depend on the current iteration of an outer star. Pure sregexes restrict synchronization to the local scope, while full sregexes also allow synchronization across iterations. In contrast to operational semantics in previous work on backreferences, we present a denotational semantics, where concretizations act similarly to valuations in logic. As with backreferences, we show that matching a word is NP-complete. Pure and full synchronized languages are considered and we show that they are closed under concatenation, union and star. By a pumping lemma, they are not closed under intersection. Relationships to other language models are discussed.
CommentsExtended submitted manuscript to be presented and published at ICTAC 2026, November 9-15, Bariloche, see https://ictac2026.github.io/