PolySAT: Word-level Bit-vector Reasoning in Z3
Jakob Rath, Clemens Eisenhofer, Daniela Kaufmann, Nikolaj Bjørner, Laura Kovács
TL;DR
PolySAT addresses the scalability of bit-vector reasoning for large widths by enabling word-level, non-linear reasoning integrated into Z3. It combines a bit-vector e-graph plugin with a theory solver that translates constraints into primitive forms, tracks viable values via forbidden intervals, and learns non-linear lemmas on demand, all within a CDCL(T) framework. Key contributions include interval-based viable-value tracking, incremental linearization rules, on-demand non-linear lemmas, and a selective bit-blasting fallback, validated through experiments showing complementary strengths to existing solvers. The approach enables efficient, scalable reasoning for bit-vector problems in model checking and smart-contract verification, where traditional bit-blasting struggles.
Abstract
PolySAT is a word-level decision procedure supporting bit-precise SMT reasoning over polynomial arithmetic with large bit-vector operations. The PolySAT calculus extends conflict-driven clause learning modulo theories with two key components: (i) a bit-vector plugin to the equality graph, and (ii) a theory solver for bit-vector arithmetic with non-linear polynomials. PolySAT implements dedicated procedures to extract bit-vector intervals from polynomial inequalities. For the purpose of conflict analysis and resolution, PolySAT comes with on-demand lemma generation over non-linear bit-vector arithmetic. PolySAT is integrated into the SMT solver Z3 and has potential applications in model checking and smart contract verification where bit-blasting techniques on multipliers/divisions do not scale.
