mirror of
https://github.com/Z3Prover/z3
synced 2025-08-19 09:40:20 +00:00
tune euf-completion
This commit is contained in:
parent
22353c2d6c
commit
9a2693bb72
6 changed files with 104 additions and 11 deletions
|
@ -780,6 +780,10 @@ br_status bool_rewriter::mk_eq_core(expr * lhs, expr * rhs, expr_ref & result) {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (m_order_eq && lhs->get_id() > rhs->get_id()) {
|
||||
result = m().mk_eq(rhs, lhs);
|
||||
return BR_DONE;
|
||||
}
|
||||
return BR_FAILED;
|
||||
}
|
||||
|
||||
|
|
|
@ -52,10 +52,11 @@ Notes:
|
|||
class bool_rewriter {
|
||||
ast_manager & m_manager;
|
||||
hoist_rewriter m_hoist;
|
||||
bool m_flat_and_or;
|
||||
bool m_local_ctx;
|
||||
bool m_elim_and;
|
||||
bool m_blast_distinct;
|
||||
bool m_flat_and_or = false;
|
||||
bool m_local_ctx = false;
|
||||
bool m_elim_and = false;
|
||||
bool m_blast_distinct = false;
|
||||
bool m_order_eq = false;
|
||||
unsigned m_blast_distinct_threshold;
|
||||
bool m_ite_extra_rules;
|
||||
unsigned m_local_ctx_limit;
|
||||
|
@ -90,6 +91,7 @@ public:
|
|||
bool elim_and() const { return m_elim_and; }
|
||||
void set_elim_and(bool f) { m_elim_and = f; }
|
||||
void reset_local_ctx_cost() { m_local_ctx_cost = 0; }
|
||||
void set_order_eq(bool f) { m_order_eq = f; }
|
||||
|
||||
void updt_params(params_ref const & p);
|
||||
|
||||
|
|
|
@ -707,9 +707,10 @@ struct th_rewriter_cfg : public default_rewriter_cfg {
|
|||
|
||||
expr_ref mk_eq(expr* a, expr* b) {
|
||||
expr_ref result(m());
|
||||
if (a->get_id() > b->get_id())
|
||||
std::swap(a, b);
|
||||
if (BR_FAILED == reduce_eq(a, b, result))
|
||||
br_status st = reduce_eq(a, b, result);
|
||||
if (BR_FAILED == st)
|
||||
st = m_b_rw.mk_eq_core(a, b, result);
|
||||
if (BR_FAILED == st)
|
||||
result = m().mk_eq(a, b);
|
||||
return result;
|
||||
}
|
||||
|
@ -945,6 +946,10 @@ void th_rewriter::set_flat_and_or(bool f) {
|
|||
m_imp->cfg().m_b_rw.set_flat_and_or(f);
|
||||
}
|
||||
|
||||
void th_rewriter::set_order_eq(bool f) {
|
||||
m_imp->cfg().m_b_rw.set_order_eq(f);
|
||||
}
|
||||
|
||||
th_rewriter::~th_rewriter() {
|
||||
dealloc(m_imp);
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@ public:
|
|||
static void get_param_descrs(param_descrs & r);
|
||||
|
||||
void set_flat_and_or(bool f);
|
||||
void set_order_eq(bool f);
|
||||
|
||||
unsigned get_cache_size() const;
|
||||
unsigned get_num_steps() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue