Skip to content

Commit 0758c93

Browse files
fix #6591
- add check for lambdas similar to as-array in context of quantifiers. MBQI is not a decision procedure for this combination and can then incorrectly conclude satisfiabiltiy. Scenario The formula contains assertions - bv = (map or (lambda ..) t) - forall y (not (select bv (pair s y))) Since bv is extensionally equal to a term that depends on a lambda, MBQI cannot just take the current finite approximation of bv when checking the quantifier for satisfiability.
1 parent 6454e7f commit 0758c93

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

src/smt/theory_array_full.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@ namespace smt {
252252
else if (m.is_lambda_def(n->get_decl())) {
253253
instantiate_default_lambda_def_axiom(n);
254254
d->m_lambdas.push_back(n);
255+
m_lambdas.push_back(n);
256+
ctx.push_trail(push_back_vector(m_lambdas));
255257
}
256258
return r;
257259
}
@@ -830,6 +832,12 @@ namespace smt {
830832
return true;
831833
}
832834
}
835+
for (enode* n : m_lambdas)
836+
for (enode* p : n->get_parents())
837+
if (!ctx.is_beta_redex(p, n)) {
838+
TRACE("array", tout << "not a beta redex " << enode_pp(p, ctx) << "\n");
839+
return true;
840+
}
833841
return false;
834842
}
835843

src/smt/theory_array_full.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ namespace smt {
8686
bool has_unitary_domain(app* array_term);
8787
std::pair<app*,func_decl*> mk_epsilon(sort* s);
8888
enode_vector m_as_array;
89+
enode_vector m_lambdas;
8990
bool has_non_beta_as_array();
9091

9192
bool instantiate_select_const_axiom(enode* select, enode* cnst);

0 commit comments

Comments
 (0)