Abstract
There are already quite a few tools for solving the Satisfiability Modulo Theories (SMT) problems. In this paper, we present VolCE, a tool for counting the solutions of SMT constraints, or in other words, for computing the volume of the solution space. Its input is essentially a set of Boolean combinations of linear constraints, where the numeric variables are either all integers or all reals, and each variable is bounded. The tool extends SMT solving with integer solution counting and volume computation/estimation for convex polytopes. Effective heuristics are adopted, which enable the tool to deal with high-dimensional problem instances efficiently and accurately.
Introduction
Standard Satisfiability Modulo Theories (SMT) solvers are designed to provide a binary answer: "Satisfiable" (SAT) or "Unsatisfiable" (UNSAT). However, many domains—including program analysis, probabilistic verification, and privacy research—require quantitative insights. Researchers often need to determine the size of the solution space, such as the probability of a specific execution path.
Calculating this volume is computationally intensive. For linear constraints, the solution space is a convex polytope. Computing its exact volume is #P-hard, with complexity growing exponentially with the number of variables (dimensions). Existing exact-volume tools often fail when faced with more than 10 variables.
System Architecture and Methods
VolCE (Volume Counting and Estimation) integrates SMT solving with advanced volume estimation techniques to make high-dimensional computation practical.
The "Bunching" Strategy
A key innovation in VolCE is the "Bunching" strategy. Instead of calculating the volume for every individual assignment found by the SMT solver, VolCE groups them into "bunches"—feasible partial assignments that represent many individual solutions. This significantly reduces the number of calls to expensive volume-calculation sub-routines.
PolyVest and Optimization Heuristics
When exact volume computation is too slow, VolCE utilizes PolyVest, a sub-procedure based on the Multiphase Monte-Carlo algorithm. PolyVest estimates volume by placing concentric balls inside the polytope and sampling points. To improve efficiency, the authors implemented:
- Reverse-Order Point Reutilization: Points are generated from the outermost layer inward. Since inner layers are contained within outer ones, points can be reused, reducing computational effort by over 70%.
- Two-Round Dynamic Sampling: A preliminary "quick" estimation identifies the largest "bunches." A second round then allocates more samples to these significant areas, ensuring high accuracy where it matters most.
Experimental Evaluation
The authors evaluated VolCE using benchmarks from static program analysis (e.g., abs, findmiddle), SMT-Lib (QF_LRA and QF_LIA), and synthetically generated random instances.
Key Results
PolyVest demonstrated high efficiency and scalability. For high-dimensional instances where exact tools like Vinci timed out, VolCE provided estimates with relative errors typically under 5%.
As shown in the results, the two-round sampling strategy saved more than 90% of execution time and 95% of sample points compared to standard algorithms on random instances. While exact computation struggled beyond 10 variables, VolCE successfully handled 30-variable problems and scaled up to 50 variables for specific instances.
Conclusion
VolCE represents a significant step in moving SMT solving from qualitative to quantitative analysis. By employing heuristics like bunching and reverse-order point reutilization, it overcomes the "curse of dimensionality" that limits exact tools. Future work will focus on refining bunching heuristics and extending support to non-linear constraints and broader SMT theories.
Summary updated