Towards SMT Solver Stability via Input Normalization
Daneshvar Amrollahi, Mathias Preiner, Aina Niemetz, Andrew Reynolds, Moses Charikar, Cesare Tinelli, Clark Barrett
TL;DR
This work addresses the stability problem of SMT solvers under small, semantics-preserving input mutations by proposing an input normalization strategy. It formalizes the mutation space, proves that exact normalization is GI-hard, and presents a practical approximate algorithm that sorts, renames, and reorders assertions using patterns and super-patterns, with additional optimizations for large benchmarks. Empirical results on SMT-LIB and Mariposa benchmarks show that normalization substantially reduces runtime variability (MAD) while incurring minimal overhead, and that high normalization effectiveness is achievable for many inputs. The approach is solver-agnostic and has potential applications in preprocessing, caching, and improved usability of SMT-based workflows.
Abstract
In many applications, SMT solvers are utilized to solve similar or identical tasks over time. Significant variations in performance due to small changes in the input are not uncommon and lead to frustration for users. This sort of stability problem represents an important usability challenge for SMT solvers. We introduce an approach for mitigating the stability problem based on normalizing solver inputs. We show that a perfect normalizing algorithm exists but is computationally expensive. We then describe an approximate algorithm and evaluate it on a set of benchmarks from related work, as well as a large set of benchmarks sampled from SMT-LIB. Our evaluation shows that our approximate normalizer reduces runtime variability with minimal overhead and is able to normalize a large class of mutated benchmarks to a unique normal form.
