mirror of
https://github.com/Z3Prover/z3
synced 2025-09-30 21:19:29 +00:00
add option to propagation quotients
for equations x*y + z = 0, with x, y, z integer, enforce that x divides z It is (currently) enabled within Grobner completion and applied partially to x a variable, z linear, and only when |z| < |x|.
This commit is contained in:
parent
91b4873b79
commit
e91e432496
10 changed files with 516 additions and 258 deletions
|
@ -19,6 +19,9 @@ namespace nla {
|
|||
class core;
|
||||
|
||||
class grobner : common {
|
||||
struct config {
|
||||
bool m_propagate_quotients = false;
|
||||
};
|
||||
dd::pdd_manager m_pdd_manager;
|
||||
dd::solver m_solver;
|
||||
lp::lar_solver& lra;
|
||||
|
@ -27,6 +30,7 @@ namespace nla {
|
|||
unsigned m_delay_base = 0;
|
||||
unsigned m_delay = 0;
|
||||
bool m_add_all_eqs = false;
|
||||
config m_config;
|
||||
std::unordered_map<unsigned_vector, lpvar, hash_svector> m_mon2var;
|
||||
|
||||
lp::lp_settings& lp_settings();
|
||||
|
@ -43,6 +47,11 @@ namespace nla {
|
|||
|
||||
bool propagate_linear_equations();
|
||||
bool propagate_linear_equations(dd::solver::equation const& eq);
|
||||
|
||||
bool propagate_quotients();
|
||||
bool propagate_quotients(dd::solver::equation const& eq);
|
||||
|
||||
std::pair<lp::lar_term, rational> linear_to_term(dd::pdd q);
|
||||
|
||||
void add_dependencies(lemma_builder& lemma, dd::solver::equation const& eq);
|
||||
void explain(dd::solver::equation const& eq, lp::explanation& exp);
|
||||
|
@ -73,6 +82,7 @@ namespace nla {
|
|||
public:
|
||||
grobner(core *core);
|
||||
void operator()();
|
||||
void updt_params(params_ref const& p);
|
||||
dd::solver::equation_vector const& core_equations(bool all_eqs);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue