mirror of
https://github.com/Z3Prover/z3
synced 2025-06-19 04:13:38 +00:00
revert wrong optimization for single-occurrence negative columns
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
716663b04a
commit
93fd36b5da
1 changed files with 1 additions and 12 deletions
|
@ -869,7 +869,6 @@ namespace datalog {
|
||||||
bool & dealloc, instruction_block & acc) {
|
bool & dealloc, instruction_block & acc) {
|
||||||
uint_set pos_vars;
|
uint_set pos_vars;
|
||||||
u_map<expr*> neg_vars;
|
u_map<expr*> neg_vars;
|
||||||
u_map<unsigned> occs;
|
|
||||||
ast_manager& m = m_context.get_manager();
|
ast_manager& m = m_context.get_manager();
|
||||||
unsigned pt_len = r->get_positive_tail_size();
|
unsigned pt_len = r->get_positive_tail_size();
|
||||||
unsigned ut_len = r->get_uninterpreted_tail_size();
|
unsigned ut_len = r->get_uninterpreted_tail_size();
|
||||||
|
@ -885,12 +884,6 @@ namespace datalog {
|
||||||
if (is_var(e)) {
|
if (is_var(e)) {
|
||||||
unsigned idx = to_var(e)->get_idx();
|
unsigned idx = to_var(e)->get_idx();
|
||||||
neg_vars.insert(idx, e);
|
neg_vars.insert(idx, e);
|
||||||
if (!occs.contains(idx)) {
|
|
||||||
occs.insert(idx, 1);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
occs.find(idx)++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -901,15 +894,11 @@ namespace datalog {
|
||||||
pos_vars.insert(to_var(e)->get_idx());
|
pos_vars.insert(to_var(e)->get_idx());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// add negative variables that are not in positive, but only
|
// add negative variables that are not in positive
|
||||||
// for variables that occur more than once.
|
|
||||||
u_map<expr*>::iterator it = neg_vars.begin(), end = neg_vars.end();
|
u_map<expr*>::iterator it = neg_vars.begin(), end = neg_vars.end();
|
||||||
for (; it != end; ++it) {
|
for (; it != end; ++it) {
|
||||||
unsigned v = it->m_key;
|
unsigned v = it->m_key;
|
||||||
expr* e = it->m_value;
|
expr* e = it->m_value;
|
||||||
if (occs.find(v) == 1) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (!pos_vars.contains(v)) {
|
if (!pos_vars.contains(v)) {
|
||||||
single_res_expr.push_back(e);
|
single_res_expr.push_back(e);
|
||||||
reg_idx new_single_res;
|
reg_idx new_single_res;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue