mirror of
https://github.com/Z3Prover/z3
synced 2025-04-15 13:28:47 +00:00
disable bottom-up COI on rules with negated predicates. Fixes issue #140
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
77c8e5b0a0
commit
46ca7e17e0
|
@ -298,6 +298,7 @@ namespace datalog {
|
|||
bool context::explanations_on_relation_level() const { return m_params->datalog_explanations_on_relation_level(); }
|
||||
bool context::magic_sets_for_queries() const { return m_params->datalog_magic_sets_for_queries(); }
|
||||
symbol context::tab_selection() const { return m_params->tab_selection(); }
|
||||
bool context::xform_coi() const { return m_params->xform_coi(); }
|
||||
bool context::xform_slice() const { return m_params->xform_slice(); }
|
||||
bool context::xform_bit_blast() const { return m_params->xform_bit_blast(); }
|
||||
bool context::karr() const { return m_params->xform_karr(); }
|
||||
|
|
|
@ -277,6 +277,7 @@ namespace datalog {
|
|||
bool instantiate_quantifiers() const;
|
||||
bool xform_bit_blast() const;
|
||||
bool xform_slice() const;
|
||||
bool xform_coi() const;
|
||||
|
||||
void register_finite_sort(sort * s, sort_kind k);
|
||||
|
||||
|
|
|
@ -142,6 +142,7 @@ def_module_params('fixedpoint',
|
|||
('xform.instantiate_quantifiers', BOOL, False,
|
||||
"instantiate quantified Horn clauses using E-matching heuristic"),
|
||||
('xform.coalesce_rules', BOOL, False, "coalesce rules"),
|
||||
('xform.coi', BOOL, True, "use cone of influence simplificaiton"),
|
||||
('duality.enable_restarts', BOOL, False, 'DUALITY: enable restarts'),
|
||||
))
|
||||
|
||||
|
|
|
@ -36,6 +36,9 @@ namespace datalog {
|
|||
// -----------------------------------
|
||||
|
||||
rule_set * mk_coi_filter::operator()(rule_set const & source) {
|
||||
if (!m_context.xform_coi()) {
|
||||
return 0;
|
||||
}
|
||||
if (source.empty()) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -70,6 +73,10 @@ namespace datalog {
|
|||
e->get_data().m_value = alloc(ptr_vector<rule>);
|
||||
}
|
||||
e->get_data().m_value->push_back(r);
|
||||
if (r->is_neg_tail(i)) {
|
||||
// don't try COI on rule with negation.
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue