arXiv:2611.05668cs.LONov 2026

Manuscript Offprint

arXiv:2611.05668

Sundance: A Simple SMT Solver for Program Verification

Amar Shah, Benjamin F. Jones, Can Cebeci, Jason Z. S. Hu, Lee A. Barnett, Rémi Delmas, Marijn Heule, Bryan Parno, Bruno Dutertre

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Amar Shah¹,², Benjamin F. Jones², Can Cebeci³, Jason Z. S. Hu², Lee A. Barnett², Rémi Delmas², Marijn Heule¹,², Bryan Parno¹,², Bruno Dutertre²

¹ Carnegie Mellon University, Pittsburgh, USA, ² Amazon Web Services, Seattle, USA ³ EPFL, Lausanne, Switzerland

Abstract. We present Sundance, an SMT solver for program verification written in about 13,600 lines of Rust. Sundance combines the CaDiCaL SAT solver with congruence closure, linear arithmetic, algebraic datatypes, and pattern-based quantifier instantiation. Sundance produces eDRAT proofs for every unsat answer. On 21,531 queries from Verus, Dafny, and F*, Sundance is comparable to existing solvers, with 26–38× fewer lines of code than Z3 and cvc5. We further show that its components can be swapped for Z3's arithmetic solver, MiniSat, and the Semper e-graph. We have open sourced Sundance.

1 Introduction

Auto-active program verification tools such as Dafny [53], Verus [51], and F* [76] are used to verify large-scale systems in industry and academia [3, 4, 21, 44, 50, 69, 77, 91]. Program verification has become widespread in part because of automation provided by off-the-shelf Satisfiability Modulo Theories (SMT) solvers. Verification tools translate program properties into first-order logic and call a solver, such as Z3 [61], cvc5 [7], or Alt-Ergo [26] in the back-end. This allows verification engineers to focus on high-level program properties and ignore low-level proof details.

Z3 and cvc5, the primary SMT solvers used in program verification, support many logical fragments and theories. They are employed for a wide variety of tasks: mathematics [17], fuzzing [62], model-checking [27], and many others. This requires a broad set of capabilities, complicated heuristics, and performance tuned for many different use cases. This leads to complex, large code bases: Z3 and cvc5 are each several hundred thousand lines of C++ code (519,367 lines for Z3 and 358,294 for cvc5) [7, 61].⁴ This complexity costs verification users:

  1. Opacity. It is difficult to understand why a solver succeeds or fails, so users resort to intricate encodings, obscure flag combinations, and bespoke debugging tools [10].
  2. Trust issues. Existing solvers are trusted by the verification tools, but they have been shown to contain bugs [84].

⁴ Line counts exclude blank lines, comments, and tests.

  1. Monolithic architectures. Tightly coupled components make it difficult to add features or adopt new advances. For instance, there has been an explosion of research in e-graphs [83, 87], but none of these new ideas have made their way into mainstream SMT solvers.

We believe it is time to revisit how we design SMT solvers. Verifiers use only a narrow fragment of SMT, and often disable general-purpose features such as model-based quantifier instantiation. Meanwhile, the building blocks of a solver have matured into reusable components: modern SAT solvers such as CaDiCaL [68] expose interfaces for theory integration [38], e-graph libraries are widely available [32, 83, 87], and proof formats such as eDRAT [46] make certification much cheaper than before.

To demonstrate this, we present Sundance, a simpler SMT solver specialized for program verification. Sundance is written in 13,612 lines of Rust and consists of the CaDiCaL SAT solver [68], a pattern-based quantifier instantiation engine, a congruence closure module, and a linear arithmetic module. These features are sufficient to support 91.3% of the queries in our held-out Verus benchmarks, 93.0% of Dafny benchmarks, and 97.1% of F* benchmarks. Verus and Dafny developers have asked for a solver with exactly these features [54].

Sundance has three key properties:

  1. Transparency. Sundance is designed to be simple, with a clear architecture and few heuristics (Sec. 4–Sec. 5).

  2. Trustworthiness. Sundance produces proofs in the eDRAT format, a clausal proof format inspired by SAT solvers, and every unsat result comes with a proof.

  3. Modularity. Each module implements a Rust trait, so components can be swapped out: Sundance can use either CaDiCaL or MiniSat as its SAT solver (Sec. B), and either its own arithmetic solver or Z3's.

We describe Sundance's architecture and main modules. We then evaluate Sundance on 6,662 queries from Verus, including a held-out set of 4,086 queries not used during development, and on 11,674 Dafny and 3,195 F* queries from the Mariposa benchmark suite [90], comparing it with Z3, cvc5, and Alt-Ergo. Z3 without proofs solves nearly every query, which is expected: each query comes from a project that was already verified with Z3, so Z3 solves it by construction. Our evaluation shows that:

  • Sundance is competitive on Verus (Sec. 8.1). On the held-out Verus set, it solves 86.7% of queries within 10 s, more than Z3 with proofs (82.7%) and Alt-Ergo (77.4%) and close to cvc5 (90.5%), and 90.2% within 60 s, compared with 95.3% for cvc5, 97.7% for Z3 with proofs, and 82.8% for Alt-Ergo.

  • Sundance generalizes to Dafny and F* (Sec. 8.2), even though it was not developed for them. On Dafny, it solves 73.7% of queries, more than any other proof-producing solver and Alt-Ergo; on F*, it solves 56.7%, between cvc5 (54.9%) and Alt-Ergo (59.3%).

  • Sundance's modules can be swapped (Sec. 8.3). Sundance also runs with Z3's arithmetic solver, the Semper e-graph [32], and the MiniSat SAT

1 fn upper_bound(a: &Vec<i32>) -> (ub: i32)
2 ensures
3 forall|i: int| 0 <= i < a.len()
4 => a[i] <= ub,
5 {
6 let mut ub = 0;
7 for i in 0..a.len()
8 invariant
9 forall|j: int| 0 <= j < i
10 => a[j] <= ub,
11 {
12 if a[i] > ub {
13 ub = a[i];
14 }
15 }
16 return ub
17 }

1 (declare-sort Vec 0) 2 (declare-fun len (Vec) Int) 3 (declare-fun index (Vec Int) Int) 4 5 (declare-const a Vec) 6 (declare-const i Int) 7 (declare-const ub Int) 8 9 ; Assume: i is in bounds 10 (assert (and (<= 0 i) (< i (len a))) 11 12 ; Loop invariant holds before iteration i 13 (assert (forall ((j Int)) 14 (! (= (and (<= 0 j) (< j i)) 15 (<= (index a j) ub)) 16 :pattern ((index a j)))) 17 18 ; ub_new = (if a[i] > ub then a[i] else ub) 19 (declare-const ub_new Int) 20 (assert (= ub_new 21 (ite (> (index a i) ub) (index a i) ub))) 22 23 ; Negated goal: invariant fails for i+1 24 (assert (not (forall ((j Int)) 25 (! (= (and (<= 0 j) (< j (+ i 1))) 26 (<= (index a j) ub_new)) 27 :pattern ((index a j))))

(a) Verus source.

(b) SMT-LIB query for the invariant.

Fig. 1. Running example. (a) A Verus function that computes an upper bound of a vector, with its loop invariant highlighted. (b) The simplified SMT-LIB query that Verus generates to check that the loop invariant is preserved by each iteration.

solver [36]. Each alternative regresses on every benchmark set, indicating that Sundance's default configuration is the best of those we tried.

We have open sourced Sundance.

References (81)