mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 04:03:39 +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:
parent
eebff13f8b
commit
92ad285951
|
@ -1416,6 +1416,7 @@ namespace sls {
|
||||||
buffer<var_t> todo;
|
buffer<var_t> todo;
|
||||||
todo.push_back(v);
|
todo.push_back(v);
|
||||||
auto& vi = m_vars[v];
|
auto& vi = m_vars[v];
|
||||||
|
m_tmp_set.reset();
|
||||||
for (unsigned i = 0; i < todo.size(); ++i) {
|
for (unsigned i = 0; i < todo.size(); ++i) {
|
||||||
var_t u = todo[i];
|
var_t u = todo[i];
|
||||||
auto& ui = m_vars[u];
|
auto& ui = m_vars[u];
|
||||||
|
@ -1434,8 +1435,10 @@ namespace sls {
|
||||||
todo.push_back(x);
|
todo.push_back(x);
|
||||||
}
|
}
|
||||||
for (auto const& [coeff, bv] : ui.m_linear_occurs)
|
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>
|
template<typename num_t>
|
||||||
|
|
|
@ -119,7 +119,7 @@ namespace sls {
|
||||||
arith_op_kind m_op = arith_op_kind::LAST_ARITH_OP;
|
arith_op_kind m_op = arith_op_kind::LAST_ARITH_OP;
|
||||||
unsigned m_def_idx = UINT_MAX;
|
unsigned m_def_idx = UINT_MAX;
|
||||||
vector<std::pair<num_t, sat::bool_var>> m_linear_occurs;
|
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_muls;
|
||||||
unsigned_vector m_adds;
|
unsigned_vector m_adds;
|
||||||
optional<bound> m_lo, m_hi;
|
optional<bound> m_lo, m_hi;
|
||||||
|
@ -215,6 +215,7 @@ namespace sls {
|
||||||
arith_clausal<num_t> m_clausal_sls;
|
arith_clausal<num_t> m_clausal_sls;
|
||||||
svector<double> m_prob_break;
|
svector<double> m_prob_break;
|
||||||
indexed_uint_set m_bool_var_atoms;
|
indexed_uint_set m_bool_var_atoms;
|
||||||
|
indexed_uint_set m_tmp_set;
|
||||||
|
|
||||||
void invariant();
|
void invariant();
|
||||||
void invariant(ineq const& i);
|
void invariant(ineq const& i);
|
||||||
|
|
Loading…
Reference in a new issue