CSB: A Counting and Sampling tool for Bit-vectors

📅 2026-07-05
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work presents the first systematic solution to the problems of model counting and sampling in the theory of bit-vectors. By leveraging bit-blasting to translate bit-vector formulas into conjunctive normal form (CNF), the approach integrates modern CNF counters and samplers to uniformly support a wide range of modes, including exact and approximate counting, projected and unprojected counting, as well as near-uniform and uniform sampling. The resulting tool, csb, addresses a critical gap in efficient counting and sampling for bit-vector constraints and demonstrates substantial performance advantages over existing methods in empirical evaluations, highlighting its practicality and effectiveness.
📝 Abstract
Satisfiability modulo theory (SMT) solvers have significantly advanced automated reasoning due to their effectiveness in solving problems across various fields. With the advancement in SMT solvers, there is growing interest in exploring capabilities beyond mere satisfiability, similar to the progression observed in Boolean satisfiability solvers that expanded into counting and sampling. In this study, we investigate the following question: Can we rely on modern CNF model counters and CNF samplers to extend modern SMT solvers to handle the problems of counting and sampling over bit-vectors? The main contribution of this work is the development of an efficient and user-friendly tool, csb, that solves a bunch of problems around model counting and sampling on the theory of bit-vectors, namely exact and approximate projected and non-projected model counting, along with the almost-uniform and uniform-like sampling. In the case of exact counting, projected counting, and uniform sampling. Our tool csb converts the bit-vector formula into a CNF formula using bit-blasting techniques before applying CNF model counters or samplers to perform counting or sampling. Our experiments demonstrate significant performance improvements over existing methods.
Problem

Research questions and friction points this paper is trying to address.

SMT solvers
bit-vectors
model counting
sampling
CNF
Innovation

Methods, ideas, or system contributions that make the work stand out.

model counting
uniform sampling
bit-vector SMT
bit-blasting
CNF encoding
🔎 Similar Papers
No similar papers found.