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.
翻译:我们为无量化物首级成员在字符串长度上的上游和线性算术提出了一个新颖的长觉解算法。 我们在Z3 理论验证器中实施和评估这种算法和相关的超律法。一个至关重要的洞察力是,现实世界的事例包含大量关于在限制下字符长度的上下界限的信息,这种信息可以非常有效地用于简化代表常规表达式的自动数据操作。此外,我们提供了一些新的一般超律学,例如前缀/后缀法,这可以与各种正弦解算法一起使用,使其更加有效。我们通过广泛的经验评估,展示了我们的算法和超下界法的力量,即:57256 兹坚重度,其中近75%来自工业应用程序,或来自其他求解器开发者。我们的解析器比其他5个高级字符串解算法高,即:CVC4、OSTRI3、SDRIV3、SO-x3 超越SUDSUT、SUT-x3, 超过SUT-SUTSU3, AS-SUT-xxxxxxxxx, 超过这个速度。