3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-04 02:10:23 +00:00

return unknown if m_array_weak was used and result is satisfiable

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-08-02 00:20:41 +08:00
parent 3f032e85e0
commit 0a29002c2f
6 changed files with 61 additions and 18 deletions

View file

@ -87,9 +87,13 @@ namespace smt {
var_data_full * d_full = m_var_data_full[v];
d_full->m_parent_maps.push_back(s);
m_trail_stack.push(push_back_trail<theory_array, enode *, false>(d_full->m_parent_maps));
if (!m_params.m_array_weak && !m_params.m_array_delay_exp_axiom && d->m_prop_upward) {
if (!m_params.m_array_delay_exp_axiom && d->m_prop_upward) {
for (enode * n : d->m_parent_selects) {
if (!m_params.m_array_cg || n->is_cgr()) {
if (m_params.m_array_weak) {
found_unsupported_op(s);
break;
}
instantiate_select_map_axiom(n, s);
}
}
@ -100,14 +104,16 @@ namespace smt {
// set set_prop_upward on root and recursively on children if necessary.
//
void theory_array_full::set_prop_upward(theory_var v) {
if (m_params.m_array_weak)
return;
v = find(v);
var_data * d = m_var_data[v];
if (!d->m_prop_upward) {
m_trail_stack.push(reset_flag_trail<theory_array>(d->m_prop_upward));
d->m_prop_upward = true;
TRACE("array", tout << "#" << v << "\n";);
if (m_params.m_array_weak) {
found_unsupported_op(v);
return;
}
if (!m_params.m_array_delay_exp_axiom) {
instantiate_axiom2b_for(v);
instantiate_axiom_map_for(v);
@ -355,8 +361,13 @@ namespace smt {
instantiate_default_store_axiom(store);
}
if (!m_params.m_array_weak && !m_params.m_array_delay_exp_axiom && d->m_prop_upward) {
instantiate_parent_stores_default(v);
if (!m_params.m_array_delay_exp_axiom && d->m_prop_upward) {
if (m_params.m_array_weak) {
found_unsupported_op(v);
}
else {
instantiate_parent_stores_default(v);
}
}
}
@ -376,10 +387,14 @@ namespace smt {
SASSERT(is_map(map));
instantiate_select_map_axiom(s, map);
}
if (!m_params.m_array_weak && !m_params.m_array_delay_exp_axiom && d->m_prop_upward) {
if (!m_params.m_array_delay_exp_axiom && d->m_prop_upward) {
for (enode * map : d_full->m_parent_maps) {
SASSERT(is_map(map));
if (!m_params.m_array_cg || map->is_cgr()) {
if (m_params.m_array_weak) {
found_unsupported_op(s);
break;
}
instantiate_select_map_axiom(s, map);
}
}
@ -748,8 +763,11 @@ namespace smt {
var_data * d = m_var_data[v];
if (d->m_prop_upward && instantiate_axiom_map_for(v))
r = FC_CONTINUE;
if (d->m_prop_upward && !m_params.m_array_weak) {
if (instantiate_parent_stores_default(v))
if (d->m_prop_upward) {
if (m_params.m_array_weak) {
found_unsupported_op(v);
}
else if (instantiate_parent_stores_default(v))
r = FC_CONTINUE;
}
}