arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2010.07253cs.LO
收藏

字符串长度上正则表达式和线性算术的SMT求解器

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

摘要:

针对正则表达式成员谓词上的无量词一阶理论和字符串长度上的线性算术,提出了一种新的长度感知求解算法。我们在Z3定理证明器中实现并评估了该算法和相关算法。支撑我们算法的一个关键见解是,现实世界的实例包含大量关于约束条件下字符串长度的上下界的信息,这些信息可以非常有效地用于简化表示正则表达式的自动机上的操作。此外,我们提出了一些新的通用算法,如前缀/后缀的方法,可以与各种正则表达式求解算法结合使用,使它们更有效。我们通过对57256个regex重实例的大型和多样化的基准进行广泛的实证评估,展示了我们的算法和算法的强大功能,其中近75%来自工业应用程序或由其他求解器开发人员贡献。我们的求解器优于其他五个最先进的字符串求解器,即CVC 4,OSTRICH,Z3 seq,Z3 str 3和Z3-Trau,在这个基准测试中,特别是实现了2.4倍的加速比CVC 4,4.4倍的加速比Z3 seq,6.4倍的加速比Z3-Trau,9.1倍的加速比Z3 str 3,和13倍的加速比OSTRICH。

英文摘要:

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 instances contain a wealth of information about upper and lower bounds on lengths of strings under constraints, 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 in conjunction with a variety of regex solving algorithms, making them more efficient. 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 2.4x speedup over CVC4, 4.4x speedup over Z3seq, 6.4x speedup over Z3-Trau, 9.1x speedup over Z3str3, and 13x speedup over OSTRICH.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑