mirror of
https://github.com/Z3Prover/z3
synced 2025-07-19 19:02:02 +00:00
This commit is contained in:
parent
005d35f9c9
commit
644bd82ac7
3 changed files with 17 additions and 6 deletions
|
@ -417,6 +417,16 @@ namespace euf {
|
||||||
std::swap(r1, r2);
|
std::swap(r1, r2);
|
||||||
std::swap(n1, n2);
|
std::swap(n1, n2);
|
||||||
}
|
}
|
||||||
|
if (m.is_false(r2->get_expr()) && r1->value() == l_true) {
|
||||||
|
std::cout << "value assign conflict\n";
|
||||||
|
set_conflict(n1, n2, j);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (m.is_true(r2->get_expr()) && r1->value() == l_false) {
|
||||||
|
std::cout << "value assign conflict\n";
|
||||||
|
set_conflict(n1, n2, j);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (j.is_congruence() && (m.is_false(r2->get_expr()) || m.is_true(r2->get_expr())))
|
if (j.is_congruence() && (m.is_false(r2->get_expr()) || m.is_true(r2->get_expr())))
|
||||||
add_literal(n1, false);
|
add_literal(n1, false);
|
||||||
if (n1->is_equality() && n1->value() == l_false)
|
if (n1->is_equality() && n1->value() == l_false)
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace array {
|
||||||
dep.insert(n, nullptr);
|
dep.insert(n, nullptr);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
for (euf::enode* p : euf::enode_parents(n)) {
|
for (euf::enode* p : euf::enode_parents(n->get_root())) {
|
||||||
if (a.is_default(p->get_expr())) {
|
if (a.is_default(p->get_expr())) {
|
||||||
dep.add(n, p);
|
dep.add(n, p);
|
||||||
continue;
|
continue;
|
||||||
|
@ -51,6 +51,7 @@ namespace array {
|
||||||
SASSERT(a.is_array(n->get_expr()));
|
SASSERT(a.is_array(n->get_expr()));
|
||||||
ptr_vector<expr> args;
|
ptr_vector<expr> args;
|
||||||
sort* srt = n->get_sort();
|
sort* srt = n->get_sort();
|
||||||
|
n = n->get_root();
|
||||||
unsigned arity = get_array_arity(srt);
|
unsigned arity = get_array_arity(srt);
|
||||||
func_decl * f = mk_aux_decl_for_array_sort(m, srt);
|
func_decl * f = mk_aux_decl_for_array_sort(m, srt);
|
||||||
func_interp * fi = alloc(func_interp, m, arity);
|
func_interp * fi = alloc(func_interp, m, arity);
|
||||||
|
@ -70,7 +71,7 @@ namespace array {
|
||||||
expr* else_value = nullptr;
|
expr* else_value = nullptr;
|
||||||
unsigned max_occ_num = 0;
|
unsigned max_occ_num = 0;
|
||||||
obj_map<expr, unsigned> num_occ;
|
obj_map<expr, unsigned> num_occ;
|
||||||
for (euf::enode* p : euf::enode_parents(n)) {
|
for (euf::enode* p : euf::enode_parents(n->get_root())) {
|
||||||
if (a.is_select(p->get_expr()) && p->get_arg(0)->get_root() == n->get_root()) {
|
if (a.is_select(p->get_expr()) && p->get_arg(0)->get_root() == n->get_root()) {
|
||||||
expr* v = values.get(p->get_root_id());
|
expr* v = values.get(p->get_root_id());
|
||||||
if (!v)
|
if (!v)
|
||||||
|
@ -90,7 +91,7 @@ namespace array {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (euf::enode* p : euf::enode_parents(n)) {
|
for (euf::enode* p : euf::enode_parents(n)) {
|
||||||
if (a.is_select(p->get_expr()) && p->get_arg(0)->get_root() == n->get_root()) {
|
if (a.is_select(p->get_expr()) && p->get_arg(0)->get_root() == n) {
|
||||||
expr* value = values.get(p->get_root_id());
|
expr* value = values.get(p->get_root_id());
|
||||||
if (!value || value == fi->get_else())
|
if (!value || value == fi->get_else())
|
||||||
continue;
|
continue;
|
||||||
|
@ -102,7 +103,7 @@ namespace array {
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter p(f);
|
parameter p(f);
|
||||||
values.set(n->get_root_id(), m.mk_app(get_id(), OP_AS_ARRAY, 1, &p));
|
values.set(n->get_expr_id(), m.mk_app(get_id(), OP_AS_ARRAY, 1, &p));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue