3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-06 17:44:08 +00:00

use vector instead of indexed uint set for Boolean var occurrences

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2025-01-21 13:35:48 -08:00
parent eebff13f8b
commit 92ad285951
2 changed files with 6 additions and 2 deletions

View file

@ -1416,6 +1416,7 @@ namespace sls {
buffer<var_t> todo;
todo.push_back(v);
auto& vi = m_vars[v];
m_tmp_set.reset();
for (unsigned i = 0; i < todo.size(); ++i) {
var_t u = todo[i];
auto& ui = m_vars[u];
@ -1434,8 +1435,10 @@ namespace sls {
todo.push_back(x);
}
for (auto const& [coeff, bv] : ui.m_linear_occurs)
vi.m_bool_vars_of.insert(bv);
m_tmp_set.insert(bv);
}
for (auto bv : m_tmp_set)
vi.m_bool_vars_of.push_back(bv);
}
template<typename num_t>

View file

@ -119,7 +119,7 @@ namespace sls {
arith_op_kind m_op = arith_op_kind::LAST_ARITH_OP;
unsigned m_def_idx = UINT_MAX;
vector<std::pair<num_t, sat::bool_var>> m_linear_occurs;
indexed_uint_set m_bool_vars_of;
sat::bool_var_vector m_bool_vars_of;
unsigned_vector m_muls;
unsigned_vector m_adds;
optional<bound> m_lo, m_hi;
@ -215,6 +215,7 @@ namespace sls {
arith_clausal<num_t> m_clausal_sls;
svector<double> m_prob_break;
indexed_uint_set m_bool_var_atoms;
indexed_uint_set m_tmp_set;
void invariant();
void invariant(ineq const& i);