3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 01:25:31 +00:00

add parameter for scenario from #4743

This commit is contained in:
Nikolaj Bjorner 2020-10-30 01:14:34 -07:00
parent ceedd7e84d
commit f354671465
5 changed files with 21 additions and 18 deletions

View file

@ -30,6 +30,7 @@ void array_rewriter::updt_params(params_ref const & _p) {
m_expand_select_store = p.expand_select_store();
m_expand_store_eq = p.expand_store_eq();
m_expand_nested_stores = p.expand_nested_stores();
m_blast_select_store = p.blast_select_store();
m_expand_select_ite = false;
}
@ -179,7 +180,7 @@ br_status array_rewriter::mk_select_core(unsigned num_args, expr * const * args,
return BR_REWRITE1;
}
default:
if (m_expand_select_store && to_app(args[0])->get_arg(0)->get_ref_count() == 1) {
if (m_blast_select_store || (m_expand_select_store && to_app(args[0])->get_arg(0)->get_ref_count() == 1)) {
// select(store(a, I, v), J) --> ite(I=J, v, select(a, J))
ptr_buffer<expr> new_args;
new_args.push_back(to_app(args[0])->get_arg(0));

View file

@ -28,11 +28,12 @@ Notes:
*/
class array_rewriter {
array_util m_util;
bool m_sort_store;
bool m_expand_select_store;
bool m_expand_store_eq;
bool m_expand_select_ite;
bool m_expand_nested_stores;
bool m_sort_store { false };
bool m_blast_select_store { false };
bool m_expand_select_store { false };
bool m_expand_store_eq { false };
bool m_expand_select_ite { false };
bool m_expand_nested_stores { false };
template<bool CHECK_DISEQ>
lbool compare_args(unsigned num_args, expr * const * args1, expr * const * args2);
void mk_eq(expr* e, expr* lhs, expr* rhs, expr_ref_vector& fmls);
@ -48,7 +49,6 @@ public:
array_rewriter(ast_manager & m, params_ref const & p = params_ref()):
m_util(m) {
updt_params(p);
}
ast_manager & m() const { return m_util.get_manager(); }
family_id get_fid() const { return m_util.get_family_id(); }

View file

@ -789,8 +789,6 @@ struct th_rewriter_cfg : public default_rewriter_cfg {
};
}
template class rewriter_tpl<th_rewriter_cfg>;
struct th_rewriter::imp : public rewriter_tpl<th_rewriter_cfg> {
th_rewriter_cfg m_cfg;
imp(ast_manager & m, params_ref const & p):