mirror of
https://github.com/Z3Prover/z3
synced 2025-06-29 09:28:45 +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:
parent
3f032e85e0
commit
0a29002c2f
6 changed files with 61 additions and 18 deletions
|
@ -100,10 +100,14 @@ namespace smt {
|
|||
for (enode* n : d->m_stores) {
|
||||
instantiate_axiom2a(s, n);
|
||||
}
|
||||
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* store : d->m_parent_stores) {
|
||||
SASSERT(is_store(store));
|
||||
if (!m_params.m_array_cg || store->is_cgr()) {
|
||||
if (m_params.m_array_weak) {
|
||||
found_unsupported_op(store->get_owner());
|
||||
break;
|
||||
}
|
||||
instantiate_axiom2b(s, store);
|
||||
}
|
||||
}
|
||||
|
@ -118,10 +122,17 @@ namespace smt {
|
|||
var_data * d = m_var_data[v];
|
||||
d->m_parent_stores.push_back(s);
|
||||
m_trail_stack.push(push_back_trail<theory_array, enode *, false>(d->m_parent_stores));
|
||||
if (!m_params.m_array_weak && !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 (d->m_prop_upward && !m_params.m_array_delay_exp_axiom) {
|
||||
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_axiom2b(n, s);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool theory_array::instantiate_axiom2b_for(theory_var v) {
|
||||
|
@ -138,15 +149,17 @@ namespace smt {
|
|||
\brief Mark v for upward propagation. That is, enables the propagation of select(v, i) to store(v,j,k).
|
||||
*/
|
||||
void theory_array::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) {
|
||||
TRACE("array", tout << "#" << v << "\n";);
|
||||
m_trail_stack.push(reset_flag_trail<theory_array>(d->m_prop_upward));
|
||||
d->m_prop_upward = true;
|
||||
if (!m_params.m_array_delay_exp_axiom)
|
||||
if (m_params.m_array_weak) {
|
||||
found_unsupported_op(v);
|
||||
return;
|
||||
}
|
||||
if (!m_params.m_array_delay_exp_axiom)
|
||||
instantiate_axiom2b_for(v);
|
||||
for (enode * n : d->m_stores)
|
||||
set_prop_upward(n);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue