一句话:针对困难非线性乘法、搜索空间与冗余问题改进位爆破,实现 BLAN 并在 SMT(QF_NIA) 上超越现有求解器。
非线性整数约束在软硬件验证中常见且困难,SMT(QF_NIA) 是其布尔组合形式。经典方法位爆破将其归约为布尔可满足性问题,但现有纯位爆破求解器竞争力不足,存在非线性乘法、搜索空间不合适与冗余等问题。本文提出面向困难非线性乘法的自适应函数与特定约束的启发式分析策略;同时发现连续加法顺序会影响位向量位宽,并给出最优顺序决策算法以减少冗余。作者实现求解器 BLAN。在 SMT-LIB 的可满足 QF_NIA 实例上,BLAN 优于 APROVE、CVC5、MATHSAT、YICES2 和 Z3;敏感性分析验证了方法有效性,并展望结合其他求解器处理不可满足实例。
Nonlinear integer constraints are common and difficult in the verification and analysis of software/hardware. SMT(QF_NIA) generalizes such constraints, which is a boolean combination of nonlinear integer arithmetic constraints. A classical method to solve SMT(QF_NIA) is bit-blasting, which reduces them to boolean satisfiability problems. Currently, the existing pure bit-blasting based solvers are noncompetitive with other state-of-the-art SMT solvers. The bit-blasting based methods have some problems: First, the bit-blasting method is hampered by nonlinear multiplication operations; second, it sometimes does not search in a proper search space; and third, it contains some redundancy. In this paper, we focus on improving the efficiency of bit-blasting based method. To decide on a proper search space, we proposed an adaptive function for hard nonlinear multiplications, and heuristic strategies to analyze specific constraints. We also found that different orders in successive additions will result in bit vectors with different bit-widths. We proposed an optimal order decision algorithm to save redundancy in successive additions. We implement a solver with the proposed methods named BLAN. Experiments demonstrate that BLAN outperforms other state-of-the-art SMT solvers (APROVE, CVC5, MATHSAT, YICES2, Z3) on the satisfiable SMT(QF_NIA) instances in SMT-LIB. We provide an outlook of BLAN on solving unsatisfiable instances via combining with other solvers. Sensitivity analysis also demonstrates the effectiveness of the proposed methods.