3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-29 20:05:51 +00:00

Fix UP's decide callback (#6707)

* Query Boolean Assignment in the UP

* UP's decide ref arguments => next_split

* Fixed wrapper

* More fixes
This commit is contained in:
Clemens Eisenhofer 2023-06-02 09:52:54 +02:00 committed by GitHub
parent d59bf55539
commit 82667bd86b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 174 additions and 169 deletions

View file

@ -128,7 +128,7 @@ namespace bv {
/**
\brief Find an unassigned bit for m_wpos[v], if such bit cannot be found invoke fixed_var_eh
*/
void solver::find_wpos(theory_var v) {
bool solver::find_wpos(theory_var v) {
literal_vector const& bits = m_bits[v];
unsigned sz = bits.size();
unsigned& wpos = m_wpos[v];
@ -137,11 +137,12 @@ namespace bv {
if (s().value(bits[idx]) == l_undef) {
wpos = idx;
TRACE("bv", tout << "moved wpos of v" << v << " to " << wpos << "\n";);
return;
return false;
}
}
TRACE("bv", tout << "v" << v << " is a fixed variable.\n";);
fixed_var_eh(v);
return true;
}
/**
@ -853,7 +854,17 @@ namespace bv {
values[n->get_root_id()] = bv.mk_numeral(val, m_bits[v].size());
}
trail_stack& solver::get_trail_stack() {
sat::bool_var solver::get_bit(unsigned bit, euf::enode *n) const {
theory_var v = n->get_th_var(get_id());
if (v == euf::null_theory_var)
return sat::null_bool_var;
auto &bits = m_bits[v];
if (bit >= bits.size())
return sat::null_bool_var;
return bits[bit].var();
}
trail_stack &solver::get_trail_stack() {
return ctx.get_trail_stack();
}