mirror of
https://github.com/Z3Prover/z3
synced 2025-04-22 16:45:31 +00:00
fix to #717. The bottom-up COI filter can only use positive facts for filtering
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
b5c521e4b2
commit
510231df42
2 changed files with 5 additions and 6 deletions
|
@ -72,7 +72,7 @@ namespace datalog {
|
|||
}
|
||||
e->get_data().m_value->push_back(cur);
|
||||
}
|
||||
if (cur->get_uninterpreted_tail_size() == 0) {
|
||||
if (cur->get_positive_tail_size() == 0) {
|
||||
func_decl *sym = cur->get_head()->get_decl();
|
||||
bool new_info = m_facts.insert_if_not_there2(sym, Fact())->get_data().m_value.init_up(m_context, cur);
|
||||
if (new_info) {
|
||||
|
@ -97,7 +97,7 @@ namespace datalog {
|
|||
}
|
||||
|
||||
void step_bottom_up() {
|
||||
for(todo_set::iterator I = m_todo[m_todo_idx].begin(),
|
||||
for(todo_set::iterator I = m_todo[m_todo_idx].begin(),
|
||||
E = m_todo[m_todo_idx].end(); I!=E; ++I) {
|
||||
ptr_vector<rule> * rules;
|
||||
if (!m_body2rules.find(*I, rules))
|
||||
|
@ -236,7 +236,7 @@ namespace datalog {
|
|||
return m_facts.get(m_rule->get_decl(idx), Fact::null_fact);
|
||||
}
|
||||
unsigned size() const {
|
||||
return m_rule->get_uninterpreted_tail_size();
|
||||
return m_rule->get_positive_tail_size();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -44,9 +44,7 @@ namespace datalog {
|
|||
if (m_context.has_facts(r->get_decl(i))) {
|
||||
return 0;
|
||||
}
|
||||
if (false && r->is_neg_tail(i)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (r->is_neg_tail(i)) {
|
||||
if (!engine.get_fact(r->get_decl(i)).is_reachable()) {
|
||||
if (!new_tail) {
|
||||
|
@ -62,6 +60,7 @@ namespace datalog {
|
|||
m_new_tail_neg.push_back(true);
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
SASSERT(!new_tail);
|
||||
if (!engine.get_fact(r->get_decl(i)).is_reachable()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue