mirror of
https://github.com/Z3Prover/z3
synced 2025-08-04 10:20:23 +00:00
fix #2387, add ite-hoist rewriting, allow assumptions to be compound expressions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
cd93cdd819
commit
88aa689a70
6 changed files with 118 additions and 33 deletions
|
@ -37,9 +37,11 @@ protected:
|
|||
bool m_hoist_mul;
|
||||
bool m_hoist_cmul;
|
||||
bool m_ast_order;
|
||||
bool m_hoist_ite;
|
||||
|
||||
bool is_numeral(expr * n) const { return Config::is_numeral(n); }
|
||||
bool is_numeral(expr * n, numeral & r) const { return Config::is_numeral(n, r); }
|
||||
bool is_int_numeral(expr * n, numeral & r) const { return Config::is_numeral(n, r) && r.is_int(); }
|
||||
bool is_minus_one(expr * n) const { return Config::is_minus_one(n); }
|
||||
void normalize(numeral & c) { Config::normalize(c, m_curr_sort); }
|
||||
app * mk_numeral(numeral const & r) { return Config::mk_numeral(r, m_curr_sort); }
|
||||
|
@ -78,6 +80,11 @@ protected:
|
|||
|
||||
br_status cancel_monomials(expr * lhs, expr * rhs, bool move, expr_ref & lhs_result, expr_ref & rhs_result);
|
||||
|
||||
bool is_nontrivial_gcd(numeral const& g) const { return !g.is_zero() && !g.is_one(); }
|
||||
bool hoist_ite(expr_ref& e);
|
||||
bool hoist_ite(expr* e, obj_hashtable<expr>& shared, numeral& g);
|
||||
expr* apply_hoist(expr* e, numeral const& g, obj_hashtable<expr> const& shared);
|
||||
|
||||
bool hoist_multiplication(expr_ref& som);
|
||||
expr* merge_muls(expr* x, expr* y);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue