mirror of
https://github.com/Z3Prover/z3
synced 2025-08-22 02:57:50 +00:00
Tune Grobner equations
\brief convert p == 0 into a solved form v == r, such that v has bounds [lo, oo) iff r has bounds [lo', oo) v has bounds (oo,hi] iff r has bounds (oo,hi'] The solved form allows the Grobner solver identify more bounds conflicts. A bad leading term can miss bounds conflicts. For example for x + y + z == 0 where x, y : [0, oo) and z : (oo,0] we prefer to solve z == -x - y instead of x == -z - y because the solution -z - y has neither an upper, nor a lower bound. The Grobner solver is augmented with a notion of a substitution that is applied before the solver is run.
This commit is contained in:
parent
f33c933241
commit
316ed778e0
5 changed files with 127 additions and 13 deletions
|
@ -118,6 +118,7 @@ private:
|
|||
equation_vector m_solved; // equations with solved variables, triangular
|
||||
equation_vector m_processed;
|
||||
equation_vector m_to_simplify;
|
||||
vector<std::tuple<unsigned, pdd, u_dependency*>> m_subst;
|
||||
mutable u_dependency_manager m_dep_manager;
|
||||
equation_vector m_all_eqs;
|
||||
equation* m_conflict;
|
||||
|
@ -136,6 +137,9 @@ public:
|
|||
void add(pdd const& p) { add(p, nullptr); }
|
||||
void add(pdd const& p, u_dependency * dep);
|
||||
|
||||
void simplify(pdd& p, u_dependency*& dep);
|
||||
void add_subst(unsigned v, pdd const& p, u_dependency* dep);
|
||||
|
||||
void simplify();
|
||||
void saturate();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue