An SMT Solver for Regular Expressions and Linear Arithmetic over String Length
Murphy Berzish, Mitja Kulczynski, Federico Mora, Florin Manea, Joel D. Day, Dirk Nowotka, Vijay Ganesh
摘要
Abstract We present a novel length-aware solving algorithm for the quantifier-free first-order theory over regex membership predicate and linear arithmetic over string length. We implement and evaluate this algorithm and related heuristics in the Z3 theorem prover. A crucial insight that underpins our algorithm is that real-world regex and string formulas contain a wealth of information about upper and lower bounds on lengths of strings, and such information can be used very effectively to simplify operations on automata representing regular expressions. Additionally, we present a number of novel general heuristics, such as the prefix/suffix method, that can be used to make a variety of regex solving algorithms more efficient in practice. We showcase the power of our algorithm and heuristics via an extensive empirical evaluation over a large and diverse benchmark of 57256 regex-heavy instances, almost 75% of which are derived from industrial applications or contributed by other solver developers. Our solver outperforms five other state-of-the-art string solvers, namely, CVC4, OSTRICH, Z3seq, Z3str3, and Z3-Trau, over this benchmark, in particular achieving a speedup of 2.4 × over CVC4, 4.4 × over Z3seq, 6.4 × over Z3-Trau, 9.1 × over Z3str3, and 13 × over OSTRICH.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 12 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Symbolic Boolean derivatives for efficiently solving extended regular expression constraints 引用了 Efficient handling of string-number conversion
- Word Equations in Synergy with Regular Constraints 引用了 Efficient handling of string-number conversion
- Incremental Dead State Detection in Logarithmic Time 引用了 Symbolic Boolean derivatives for efficiently solving extended regular expression constraints
引用它的顶会 Paper12
- Word Equations in Synergy with Regular ConstraintsFrantisek Blahoudek, Yu-Fang Chen, David Chocholatý, Vojtech Havlena 等FM 2023 · 16 次引用
- Solving String Constraints Using SATKevin Lotz, Amit Goel, Bruno Dutertre, Benjamin Kiesl-Reiter 等CAV 2023 · 11 次引用
- Speeding up SMT Solving via Compiler OptimizationBenjamin Mikek, Qirun ZhangFSE 2023 · 11 次引用
- Incremental Dead State Detection in Logarithmic TimeCaleb Stanford, Margus VeanesCAV 2023 · 4 次引用
- Coinductive Proofs of Regular Expression Equivalence in Zero KnowledgeJohn C. Kolesar, Shan Ali, Timos Antonopoulos, Ruzica PiskacOOPSLA 2025 · 4 次引用
它引用的 Paper2
相关 Paper
- Inter-theory dependency analysis for SMT string solversMinh-Thai Trinh, Duc-Hiep Chu, Joxan JaffarOOPSLA 2020 · 5 次引用
- String Solving with Stabilization and TransducersDavid Chocholatý, Vojtech Havlena, Lukás Holík, Juraj Síc 等CAV 2026
- The Power of Regular Constraint PropagationMatthew Hague, Artur Jez, Anthony Widjaja Lin, Oliver Markgraf 等OOPSLA 2025 · 2 次引用
- A Constraint Solving Approach to Parikh Images of Regular LanguagesAmanda Stjerna, Philipp RümmerOOPSLA 2024 · 2 次引用
- A Uniform Framework for Handling Position Constraints in String SolvingYu-Fang Chen, Vojtech Havlena, Michal Hecko, Lukás Holík 等PLDI 2025
