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

update rewriting of equalities and monomials for regressions

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-09-03 14:36:03 -07:00
parent 7fbb938474
commit c6722859c2
9 changed files with 102 additions and 95 deletions

View file

@ -48,7 +48,6 @@ protected:
decl_kind power_decl_kind() const { return Config::power_decl_kind(); }
bool is_power(expr * t) const { return is_app_of(t, get_fid(), power_decl_kind()); }
expr * get_power_body(expr * t, rational & k);
struct mon_pw_lt; // functor used to sort monomial elements when use_power() == true
expr * mk_mul_app(unsigned num_args, expr * const * args);
expr * mk_mul_app(numeral const & c, expr * arg);
@ -85,6 +84,14 @@ protected:
bool is_mul(expr * t, numeral & c, expr * & pp);
void hoist_cmul(expr_ref_buffer & args);
class mon_lt {
poly_rewriter& rw;
int ordinal(expr* e) const;
public:
mon_lt(poly_rewriter& rw): rw(rw) {}
bool operator()(expr* e1, expr * e2) const;
};
public:
poly_rewriter(ast_manager & m, params_ref const & p = params_ref()):
Config(m),