mirror of
https://github.com/Z3Prover/z3
synced 2025-06-06 22:23:22 +00:00
cleanup
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
7fbe7124f9
commit
ef62a52fff
1 changed files with 1 additions and 11 deletions
|
@ -1042,8 +1042,7 @@ namespace opt {
|
||||||
uint_set indices;
|
uint_set indices;
|
||||||
unsigned_vector c_indices;
|
unsigned_vector c_indices;
|
||||||
for (unsigned i = 0; i < m_asms.size(); ++i) {
|
for (unsigned i = 0; i < m_asms.size(); ++i) {
|
||||||
unsigned index = m_aux2index.find(m_asms[i]);
|
indices.insert(m_aux2index.find(m_asms[i]));
|
||||||
indices.insert(index);
|
|
||||||
}
|
}
|
||||||
for (unsigned i = 0; i < num_soft(); ++i) {
|
for (unsigned i = 0; i < num_soft(); ++i) {
|
||||||
if (!indices.contains(i)) {
|
if (!indices.contains(i)) {
|
||||||
|
@ -1064,7 +1063,6 @@ namespace opt {
|
||||||
m_hs.add_exists_true(indices.size(), indices.c_ptr());
|
m_hs.add_exists_true(indices.size(), indices.c_ptr());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void update_index(obj_map<expr, unsigned>& asm2index) {
|
void update_index(obj_map<expr, unsigned>& asm2index) {
|
||||||
obj_map<expr, unsigned>::iterator it = asm2index.begin(), end = asm2index.end();
|
obj_map<expr, unsigned>::iterator it = asm2index.begin(), end = asm2index.end();
|
||||||
for (; it != end; ++it) {
|
for (; it != end; ++it) {
|
||||||
|
@ -1082,20 +1080,12 @@ namespace opt {
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool is_true(model_ref& mdl, expr* e) {
|
bool is_true(model_ref& mdl, expr* e) {
|
||||||
expr_ref val(m);
|
expr_ref val(m);
|
||||||
VERIFY(mdl->eval(e, val));
|
VERIFY(mdl->eval(e, val));
|
||||||
return m.is_true(val);
|
return m.is_true(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool is_one(model_ref& mdl, expr* e) {
|
|
||||||
rational r;
|
|
||||||
expr_ref val(m);
|
|
||||||
VERIFY(mdl->eval(e, val));
|
|
||||||
return a.is_numeral(val, r) && r.is_one();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool is_active(unsigned i) const {
|
bool is_active(unsigned i) const {
|
||||||
return m_aux_active[i];
|
return m_aux_active[i];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue