<p>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: <i>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?</i> The main contribution of this work is the development of an efficient and user-friendly tool, <InlineEquation ID="IEq1"> <EquationSource Format="TEX">\(\textsf{csb}\)</EquationSource> <EquationSource Format="MATHML"><math> <mi mathvariant="sans-serif">csb</mi> </math></EquationSource> </InlineEquation>, 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, <InlineEquation ID="IEq2"> <EquationSource Format="TEX">\(\textsf{csb}\)</EquationSource> <EquationSource Format="MATHML"><math> <mi mathvariant="sans-serif">csb</mi> </math></EquationSource> </InlineEquation> is the first tool to solve the problem—although all these problems have a lot of applications. Our tool <InlineEquation ID="IEq3"> <EquationSource Format="TEX">\(\textsf{csb}\)</EquationSource> <EquationSource Format="MATHML"><math> <mi mathvariant="sans-serif">csb</mi> </math></EquationSource> </InlineEquation> 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. It keeps track of the variable mapping between the bitvector and CNF formula and passes that information to the CNF counter. We built our tool on top of SMT solver <InlineEquation ID="IEq4"> <EquationSource Format="TEX">\(\textsf{STP}\)</EquationSource> <EquationSource Format="MATHML"><math> <mi mathvariant="sans-serif">STP</mi> </math></EquationSource> </InlineEquation> by integrating approximate model counter <InlineEquation ID="IEq5"> <EquationSource Format="TEX">\(\textsf{ApproxMC}\)</EquationSource> <EquationSource Format="MATHML"><math> <mi mathvariant="sans-serif">ApproxMC</mi> </math></EquationSource> </InlineEquation>, exact model counter <InlineEquation ID="IEq6"> <EquationSource Format="TEX">\(\textsf{Ganak}\)</EquationSource> <EquationSource Format="MATHML"><math> <mi mathvariant="sans-serif">Ganak</mi> </math></EquationSource> </InlineEquation>, almost-uniform sampler <InlineEquation ID="IEq7"> <EquationSource Format="TEX">\(\textsf{UniGen}\)</EquationSource> <EquationSource Format="MATHML"><math> <mi mathvariant="sans-serif">UniGen</mi> </math></EquationSource> </InlineEquation>, and uniform-like sampler <InlineEquation ID="IEq8"> <EquationSource Format="TEX">\(\textsf{CMSGen}\)</EquationSource> <EquationSource Format="MATHML"><math> <mi mathvariant="sans-serif">CMSGen</mi> </math></EquationSource> </InlineEquation> in it. Our experiments demonstrate significant performance improvements over existing methods.</p>

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

CSB: A Counting and Sampling tool for Bit-vectors

  • Arijit Shaw,
  • Kuldeep S. Meel

摘要

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, \(\textsf{csb}\) 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, \(\textsf{csb}\) csb is the first tool to solve the problem—although all these problems have a lot of applications. Our tool \(\textsf{csb}\) 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. It keeps track of the variable mapping between the bitvector and CNF formula and passes that information to the CNF counter. We built our tool on top of SMT solver \(\textsf{STP}\) STP by integrating approximate model counter \(\textsf{ApproxMC}\) ApproxMC , exact model counter \(\textsf{Ganak}\) Ganak , almost-uniform sampler \(\textsf{UniGen}\) UniGen , and uniform-like sampler \(\textsf{CMSGen}\) CMSGen in it. Our experiments demonstrate significant performance improvements over existing methods.