Lune

OOPSLA2023顶会

Regular Expression Matching using Bit Vector Automata

Alexis Le Glaunec, Lingkun Kong, Konstantinos Mamouras

摘要

Regular expressions (regexes) are ubiquitous in modern software. There is a variety of implementation techniques for regex matching, which can be roughly categorized as (1) relying on backtracking search, or (2) being based on finite-state automata. The implementations that use backtracking are often chosen due to their ability to support advanced pattern-matching constructs. Unfortunately, they are known to suffer from severe performance problems. For some regular expressions, the running time for matching can be exponential in the size of the input text. In order to provide stronger guarantees of matching efficiency, automata-based regex matching is the preferred choice. However, even these regex engines may exhibit severe performance degradation for some patterns. The main reason for this is that regexes used in practice are not exclusively built from the classical regular constructs, i.e., concatenation, nondeterministic choice and Kleene's star. They involve additional constructs that provide succinctness and convenience of expression. The most common such construct is bounded repetition (also called counting), which describes the repetition of the pattern a fixed number of times.

In this paper, we propose a new algorithm for the efficient matching of regular expressions that involve bounded repetition. Our algorithms are based on a new model of automata, which we call nondeterministic bit vector automata (NBVA). This model is chosen to be expressively equivalent to nondeterministic counter automata with bounded counters, a very natural model for expressing patterns with bounded repetition. We show that there is a class of regular expressions with bounded repetition that can be matched in time that is independent from the repetition bounds. Our algorithms are general enough to cover the vast majority of challenging bounded repetitions that arise in practice. We provide an implementation of our approach in a regex engine, which we call BVA-Scan. We compare BVA-Scan against state-of-the-art regex engines on several real datasets.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 12 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • HybridSA: GPU Acceleration of Multi-pattern Regex Matching using Bit Parallelism 引用了 BVAP: Energy and Memory Efficient Automata Processing for Regular Expressions with Bounded Repetitions
  • HybridSA: GPU Acceleration of Multi-pattern Regex Matching using Bit Parallelism 引用了 Software-hardware codesign for efficient in-memory regular pattern matching
  • HybridSA: GPU Acceleration of Multi-pattern Regex Matching using Bit Parallelism 引用了 Efficient Matching of Regular Expressions with Lookaround Assertions
  • Linear Matching of JavaScript Regular Expressions 引用了 Regex matching with counting-set automata
  • Linear Matching of JavaScript Regular Expressions 引用了 Efficient Matching of Regular Expressions with Lookaround Assertions
  • BVAP: Energy and Memory Efficient Automata Processing for Regular Expressions with Bounded Repetitions 引用了 Software-hardware codesign for efficient in-memory regular pattern matching
  • BVAP: Energy and Memory Efficient Automata Processing for Regular Expressions with Bounded Repetitions 引用了 Regex matching with counting-set automata
  • BVAP: Energy and Memory Efficient Automata Processing for Regular Expressions with Bounded Repetitions 引用了 Efficient Matching of Regular Expressions with Lookaround Assertions
  • Software-hardware codesign for efficient in-memory regular pattern matching 引用了 Regex matching with counting-set automata
  • RE#: High Performance Derivative-Based Regex Matching with Intersection, Complement, and Restricted Lookarounds 引用了 Linear Matching of JavaScript Regular Expressions
  • RE#: High Performance Derivative-Based Regex Matching with Intersection, Complement, and Restricted Lookarounds 引用了 Regex matching with counting-set automata
  • RE#: High Performance Derivative-Based Regex Matching with Intersection, Complement, and Restricted Lookarounds 引用了 Efficient Matching of Regular Expressions with Lookaround Assertions
  • Efficient Matching of Regular Expressions with Lookaround Assertions 引用了 Software-hardware codesign for efficient in-memory regular pattern matching
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper12

  1. Efficient Matching of Regular Expressions with Lookaround AssertionsKonstantinos Mamouras, Agnishom ChattopadhyayPOPL 2024 · 19 次引用
  2. Linear Matching of JavaScript Regular ExpressionsAurèle Barrière, Clément Pit-ClaudelPLDI 2024 · 11 次引用
  3. BVAP: Energy and Memory Efficient Automata Processing for Regular Expressions with Bounded RepetitionsZiyuan Wen, Lingkun Kong, Alexis Le Glaunec, Konstantinos Mamouras 等ASPLOS 2024 · 11 次引用
  4. RE#: High Performance Derivative-Based Regex Matching with Intersection, Complement, and Restricted LookaroundsIan Erik Varatalu, Margus Veanes, Juhan P. ErnitsPOPL 2025 · 9 次引用
  5. HybridSA: GPU Acceleration of Multi-pattern Regex Matching using Bit ParallelismAlexis Le Glaunec, Lingkun Kong, Konstantinos MamourasOOPSLA 2024 · 6 次引用

它引用的 Paper2

  1. Software-hardware codesign for efficient in-memory regular pattern matchingLingkun Kong, Qixuan Yu, Agnishom Chattopadhyay, Alexis Le Glaunec 等PLDI 2022 · 23 次引用
  2. Regex matching with counting-set automataLenka Turonová, Lukás Holík, Ondrej Lengál, Olli Saarikivi 等OOPSLA 2020 · 22 次引用

相关 Paper

  1. RAP: Reconfigurable Automata ProcessorZiyuan Wen, Alexis Le Glaunec, Konstantinos Mamouras, Kaiyuan YangISCA 2025 · 2 次引用
  2. Counting in Regexes Considered Harmful: Exposing ReDoS Vulnerability of Nonbacktracking MatchersLenka Turonová, Lukás Holík, Ivan Homoliak, Ondrej Lengál 等USENIX Security 2022
  3. Towards Efficient Matching of Regexes with Backreferences using Register Set AutomataVojtech Havlena, Lukás Holík, Ondrej Lengál, Jan Vasák 等PLDI 2026
  4. Exploiting Structure in Regular Expression QueriesLing Zhang, Shaleen Deep, Avrilia Floratou, Anja Gruenheid 等SIGMOD 2023 · 3 次引用
  5. Sparse Regular Expression MatchingPhilip Bille, Inge Li GørtzSODA 2024 · 2 次引用
黄昏的海面,两侧是细线勾勒的悬崖