mirror of
https://github.com/Z3Prover/z3
synced 2025-08-02 01:13:18 +00:00
fix unsoundness reported in issue #777, disable ematching on recursive function definition axioms exposed in #793
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
2ff5af7d42
commit
6a9b5ea3af
2 changed files with 43 additions and 39 deletions
|
@ -901,8 +901,11 @@ namespace pdr {
|
||||||
SASSERT(m_prev);
|
SASSERT(m_prev);
|
||||||
SASSERT(children().empty());
|
SASSERT(children().empty());
|
||||||
if (this == m_next) {
|
if (this == m_next) {
|
||||||
|
SASSERT(m_prev == this);
|
||||||
|
if (root == this) {
|
||||||
root = 0;
|
root = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
m_next->m_prev = m_prev;
|
m_next->m_prev = m_prev;
|
||||||
m_prev->m_next = m_next;
|
m_prev->m_next = m_next;
|
||||||
|
|
|
@ -186,7 +186,7 @@ namespace smt {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool check_quantifier(quantifier* q) {
|
bool check_quantifier(quantifier* q) {
|
||||||
return m_context.is_relevant(q) && m_context.get_assignment(q) == l_true; // TBD: && !m_context->get_manager().is_rec_fun_def(q);
|
return m_context.is_relevant(q) && m_context.get_assignment(q) == l_true; // && !m_context.get_manager().is_rec_fun_def(q);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool quick_check_quantifiers() {
|
bool quick_check_quantifiers() {
|
||||||
|
@ -357,8 +357,6 @@ namespace smt {
|
||||||
}
|
}
|
||||||
|
|
||||||
void quantifier_manager::reset() {
|
void quantifier_manager::reset() {
|
||||||
#pragma omp critical (quantifier_manager)
|
|
||||||
{
|
|
||||||
context & ctx = m_imp->m_context;
|
context & ctx = m_imp->m_context;
|
||||||
smt_params & p = m_imp->m_params;
|
smt_params & p = m_imp->m_params;
|
||||||
quantifier_manager_plugin * plugin = m_imp->m_plugin->mk_fresh();
|
quantifier_manager_plugin * plugin = m_imp->m_plugin->mk_fresh();
|
||||||
|
@ -366,7 +364,6 @@ namespace smt {
|
||||||
m_imp = new (m_imp) imp(*this, ctx, p, plugin);
|
m_imp = new (m_imp) imp(*this, ctx, p, plugin);
|
||||||
plugin->set_manager(*this);
|
plugin->set_manager(*this);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void quantifier_manager::display(std::ostream & out) const {
|
void quantifier_manager::display(std::ostream & out) const {
|
||||||
}
|
}
|
||||||
|
@ -481,7 +478,12 @@ namespace smt {
|
||||||
|
|
||||||
virtual void assign_eh(quantifier * q) {
|
virtual void assign_eh(quantifier * q) {
|
||||||
m_active = true;
|
m_active = true;
|
||||||
if (m_fparams->m_ematching) {
|
if (!m_fparams->m_ematching) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (m_context->get_manager().is_rec_fun_def(q) && mbqi_enabled(q)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
bool has_unary_pattern = false;
|
bool has_unary_pattern = false;
|
||||||
unsigned num_patterns = q->get_num_patterns();
|
unsigned num_patterns = q->get_num_patterns();
|
||||||
for (unsigned i = 0; i < num_patterns; i++) {
|
for (unsigned i = 0; i < num_patterns; i++) {
|
||||||
|
@ -512,7 +514,6 @@ namespace smt {
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
bool use_ematching() const {
|
bool use_ematching() const {
|
||||||
return m_fparams->m_ematching && !m_qm->empty();
|
return m_fparams->m_ematching && !m_qm->empty();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue