3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-06 03:10:25 +00:00

Use bv.solver parameter

This commit is contained in:
Jakob Rath 2023-12-22 11:52:35 +01:00
parent e1a2c2fe47
commit cbb280d2b7
6 changed files with 4 additions and 8 deletions

View file

@ -413,7 +413,7 @@ namespace bv {
solver::internalize_mode solver::get_internalize_mode(expr* e) {
if (!reflect())
return internalize_mode::no_delay_i;
if (get_config().m_bv_polysat)
if (use_polysat())
return internalize_mode::polysat_i;
if (!bv.is_bv(e))
return internalize_mode::no_delay_i;

View file

@ -349,7 +349,7 @@ namespace bv {
void polysat_add_value(euf::enode* n, model& mdl, expr_ref_vector& values);
lbool polysat_final();
void polysat_display(std::ostream& out) const;
bool use_polysat() const { return get_config().m_bv_polysat; }
bool use_polysat() const { return get_config().m_bv_solver == 1; }
vector<polysat::pdd> m_var2pdd;
bool_vector m_var2pdd_valid;
unsigned_vector m_pddvar2var;

View file

@ -139,7 +139,7 @@ namespace euf {
if (get_config().m_bv_solver == 0)
ext = alloc(bv::solver, *this, fid);
else if (get_config().m_bv_solver == 1)
throw default_exception("polysat solver is not integrated");
ext = alloc(bv::solver, *this, fid); // old polysat solver is part of BV solver
else if (get_config().m_bv_solver == 2)
ext = alloc(intblast::solver, *this);
else

View file

@ -53,9 +53,8 @@ def_module_params(module_name='smt',
('bv.enable_int2bv', BOOL, True, 'enable support for int2bv and bv2int operators'),
('bv.watch_diseq', BOOL, False, 'use watch lists instead of eager axioms for bit-vectors'),
('bv.delay', BOOL, False, 'delay internalize expensive bit-vector operations'),
('bv.polysat', BOOL, True, 'use polysat bit-vector solver'),
('bv.size_reduce', BOOL, False, 'pre-processing; turn assertions that set the upper bits of a bit-vector to constants into a substitution that replaces the bit-vector with constant bits. Useful for minimizing circuits as many input bits to circuits are constant'),
('bv.solver', UINT, 0, 'bit-vector solver engine: 0 - bit-blasting, 1 - polysat, 2 - intblast, requires sat.smt=true'),
('bv.solver', UINT, 1, 'bit-vector solver engine: 0 - bit-blasting, 1 - polysat, 2 - intblast, requires sat.smt=true'),
('arith.random_initial_value', BOOL, False, 'use random initial values in the simplex-based procedure for linear arithmetic'),
('arith.solver', UINT, 6, 'arithmetic solver: 0 - no solver, 1 - bellman-ford based solver (diff. logic only), 2 - simplex based solver, 3 - floyd-warshall based solver (diff. logic only) and no theory combination 4 - utvpi, 5 - infinitary lra, 6 - lra solver'),
('arith.nl', BOOL, True, '(incomplete) nonlinear arithmetic support based on Groebner basis and interval propagation, relevant only if smt.arith.solver=2'),

View file

@ -27,7 +27,6 @@ void theory_bv_params::updt_params(params_ref const & _p) {
m_bv_reflect = p.bv_reflect();
m_bv_enable_int2bv2int = p.bv_enable_int2bv();
m_bv_delay = p.bv_delay();
m_bv_polysat = p.bv_polysat();
m_bv_size_reduce = p.bv_size_reduce();
m_bv_solver = p.bv_solver();
}
@ -43,7 +42,6 @@ void theory_bv_params::display(std::ostream & out) const {
DISPLAY_PARAM(m_bv_blast_max_size);
DISPLAY_PARAM(m_bv_enable_int2bv2int);
DISPLAY_PARAM(m_bv_delay);
DISPLAY_PARAM(m_bv_polysat);
DISPLAY_PARAM(m_bv_size_reduce);
DISPLAY_PARAM(m_bv_solver);
}

View file

@ -35,7 +35,6 @@ struct theory_bv_params {
bool m_bv_enable_int2bv2int = true;
bool m_bv_watch_diseq = false;
bool m_bv_delay = true;
bool m_bv_polysat = false;
bool m_bv_size_reduce = false;
unsigned m_bv_solver = 0;
theory_bv_params(params_ref const & p = params_ref()) {