mirror of
https://github.com/Z3Prover/z3
synced 2026-03-03 20:24:36 +00:00
add option to reduce pseudo-linear monomials
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
6eee8688c2
commit
98a9a34f2b
5 changed files with 65 additions and 27 deletions
|
|
@ -841,22 +841,6 @@ namespace nla {
|
|||
m_solver.add(p, dep);
|
||||
}
|
||||
|
||||
bool grobner::is_pseudo_linear(unsigned_vector const& vars) const {
|
||||
bool has_unbounded = false;
|
||||
for (auto v : vars) {
|
||||
if (c().lra.column_is_bounded(v) && c().lra.var_is_int(v)) {
|
||||
auto lb = c().lra.get_lower_bound(v);
|
||||
auto ub = c().lra.get_upper_bound(v);
|
||||
if (ub - lb <= rational(4))
|
||||
continue;
|
||||
}
|
||||
if (has_unbounded)
|
||||
return false;
|
||||
has_unbounded = true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void grobner::add_fixed_monic(unsigned j) {
|
||||
u_dependency* dep = nullptr;
|
||||
dd::pdd r = m_pdd_manager.mk_val(rational(1));
|
||||
|
|
@ -882,8 +866,7 @@ namespace nla {
|
|||
TRACE(grobner, for (lpvar j : c().m_to_refine) print_monic(c().emons()[j], tout) << "\n";);
|
||||
|
||||
for (lpvar j : c().m_to_refine)
|
||||
if (!is_pseudo_linear(c().emons()[j].vars()))
|
||||
q.push_back(j);
|
||||
q.push_back(j);
|
||||
|
||||
while (!q.empty()) {
|
||||
lpvar j = q.back();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue