mirror of
https://github.com/Z3Prover/z3
synced 2025-04-22 00:26:38 +00:00
disable polysat inside of recursive solver
This commit is contained in:
parent
1cba5fd55e
commit
704a41ee36
5 changed files with 12 additions and 5 deletions
|
@ -42,10 +42,11 @@ namespace polysat {
|
|||
bit_width(bit_width),
|
||||
x_decl(m),
|
||||
x(m) {
|
||||
// m.register_plugin(symbol("bv"), alloc(bv_decl_plugin)); // this alone doesn't work
|
||||
reg_decl_plugins(m);
|
||||
bv = alloc(bv_util, m);
|
||||
s = mk_solver(m, params_ref::get_empty(), false, true, true, symbol::null);
|
||||
params_ref p;
|
||||
p.set_bool("bv.polysat", false);
|
||||
s = mk_solver(m, p, false, true, true, symbol::null);
|
||||
x_decl = m.mk_const_decl("x", bv->mk_sort(bit_width));
|
||||
x = m.mk_const(x_decl);
|
||||
}
|
||||
|
@ -68,7 +69,8 @@ namespace polysat {
|
|||
expr* mk_poly(univariate const& p) const {
|
||||
if (p.empty()) {
|
||||
return mk_numeral(rational::zero());
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
expr* e = mk_numeral(p.back());
|
||||
for (unsigned i = p.size() - 1; i-- > 0; ) {
|
||||
e = bv->mk_bv_mul(e, x);
|
||||
|
|
|
@ -121,6 +121,7 @@ namespace sat {
|
|||
virtual bool check_model(model const& m) const { return true; }
|
||||
virtual void gc_vars(unsigned num_vars) {}
|
||||
virtual bool should_research(sat::literal_vector const& core) { return false;}
|
||||
virtual void updt_params(params_ref const& p) {}
|
||||
virtual void add_assumptions(literal_set& ext_assumptions) {}
|
||||
virtual bool tracking_assumptions() { return false; }
|
||||
virtual bool enable_self_propagate() const { return false; }
|
||||
|
|
|
@ -110,6 +110,7 @@ namespace sat {
|
|||
void solver::set_extension(extension* ext) {
|
||||
m_ext = ext;
|
||||
if (ext) {
|
||||
ext->updt_params(m_params);
|
||||
ext->set_solver(this);
|
||||
for (unsigned i = num_user_scopes(); i-- > 0;)
|
||||
ext->user_push();
|
||||
|
@ -3758,6 +3759,8 @@ namespace sat {
|
|||
if (m_config.m_cut_simplify && !m_cut_simplifier && m_user_scope_literals.empty()) {
|
||||
m_cut_simplifier = alloc(cut_simplifier, *this);
|
||||
}
|
||||
if (m_ext)
|
||||
m_ext->updt_params(m_params);
|
||||
}
|
||||
|
||||
void solver::collect_param_descrs(param_descrs & d) {
|
||||
|
|
|
@ -278,7 +278,7 @@ namespace euf {
|
|||
}
|
||||
trail_stack& get_trail_stack() { return m_trail; }
|
||||
|
||||
void updt_params(params_ref const& p);
|
||||
void updt_params(params_ref const& p) override;
|
||||
void set_lookahead(sat::lookahead* s) override { m_lookahead = s; }
|
||||
void init_search() override;
|
||||
double get_reward(literal l, ext_constraint_idx idx, sat::literal_occs_fun& occs) const override;
|
||||
|
|
|
@ -139,7 +139,7 @@ public:
|
|||
else
|
||||
l = logic;
|
||||
|
||||
tactic_params tp;
|
||||
tactic_params tp(p);
|
||||
tactic_ref t;
|
||||
if (tp.default_tactic() != symbol::null &&
|
||||
!tp.default_tactic().is_numerical() &&
|
||||
|
@ -151,6 +151,7 @@ public:
|
|||
sexpr_ref se = parse_sexpr(ctx, is, p, file_name);
|
||||
if (se) {
|
||||
t = sexpr2tactic(ctx, se.get());
|
||||
t->updt_params(p);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue