3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 01:25:31 +00:00

do not use nl variables in random_update()

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2020-02-04 11:51:37 -08:00
parent 3ab7477663
commit 06173aa4d7
7 changed files with 57 additions and 7 deletions

View file

@ -1597,12 +1597,35 @@ public:
m_variable_values.clear();
}
bool influences_nl_var(theory_var v) const {
if (!m_use_nla)
return false; // that is the legacy solver behavior
if (!m_nla)
return false;
return m_nla->influences_nl_var(get_lpvar(v));
}
bool can_be_used_in_random_update(theory_var v) const {
if (!th.is_relevant_and_shared(get_enode(v)))
return false;
if (is_int(v))
return false;
if (influences_nl_var(v))
return false;
return true;
}
bool assume_eqs() {
svector<lpvar> vars;
theory_var sz = static_cast<theory_var>(th.get_num_vars());
for (theory_var v = 0; v < sz; ++v) {
if (th.is_relevant_and_shared(get_enode(v))) {
vars.push_back(get_lpvar(v));
if (th.is_relevant_and_shared(get_enode(v))) {
if (can_be_used_in_random_update(v))
vars.push_back(get_lpvar(v));
}
}
if (vars.empty()) {