3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-22 16:45:31 +00:00

work on horner form

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2019-07-12 14:20:21 -07:00
parent 24d70abfd8
commit b6a99d515b
3 changed files with 6 additions and 3 deletions

View file

@ -189,5 +189,4 @@ void horner::set_var_interval(lpvar v, interv& b) {
}
}
auto i = interval_of_expr(e);
m_intervals.check_interval_for_conflict_on_zero(i);

View file

@ -44,6 +44,7 @@ public:
intervals::interval interval_of_sum(const vector<nex>&);
intervals::interval interval_of_mul(const vector<nex>&);
void set_interval_for_scalar(intervals::interval&, const rational&);
void set_var_interval(lpvar j, intervals::interval&);
std::set<lpvar> get_vars_of_expr(const nex &) const;
void lemmas_on_expr(nex &);
}; // end of horner

View file

@ -56,6 +56,7 @@
#include "math/lp/lp_bound_propagator.h"
#include "math/lp/nla_solver.h"
#include "math/lp/horner.h"
#include "math/lp/cross_nested.h"
namespace nla {
void test_order_lemma();
void test_monotone_lemma();
@ -73,9 +74,11 @@ void test_cn() {
nex a = nex::var(0), b = nex::var(1), c = nex::var(2), d = nex::var(3), e = nex::var(4);
nex t = a*a*d + a*b*c*d + a*c*c*d + e*a*e + e*a*c + e*d;
TRACE("nla_cn", tout << "t=" << t << '\n';);
cross_nested cn(t, [](const nex& n) { std::cout << n << "\n"; } );
cn.run();
}
}
} // end of namespace nla
namespace lp {
unsigned seed = 1;