mirror of
https://github.com/Z3Prover/z3
synced 2025-10-08 00:41:56 +00:00
updates
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
fae67b79b7
commit
0a0e925f27
4 changed files with 49 additions and 2 deletions
|
@ -30,6 +30,7 @@ z3_add_component(lp
|
|||
nla_grobner.cpp
|
||||
nla_intervals.cpp
|
||||
nla_monotone_lemmas.cpp
|
||||
nla_mul_saturate.cpp
|
||||
nla_order_lemmas.cpp
|
||||
nla_powers.cpp
|
||||
nla_pp.cpp
|
||||
|
|
|
@ -60,6 +60,7 @@ class core {
|
|||
friend class monomial_bounds;
|
||||
friend class nra::solver;
|
||||
friend class divisions;
|
||||
friend class mul_saturate;
|
||||
|
||||
unsigned m_nlsat_delay = 0;
|
||||
unsigned m_nlsat_delay_bound = 0;
|
||||
|
|
|
@ -10,13 +10,53 @@
|
|||
Check if the system with new constraints is LP feasible.
|
||||
If it is not, then produce a lemma that explains the infeasibility.
|
||||
|
||||
The lemma is in terms of the original constraints and bounds.
|
||||
|
||||
--*/
|
||||
|
||||
#include "math/lp/nla_mul_saturate.h"
|
||||
#include "math/lp/nla_core.h"
|
||||
#include "math/lp/nla_mul_saturate.h"
|
||||
|
||||
|
||||
namespace nla {
|
||||
|
||||
mul_saturate::mul_saturate(core* core) : common(core) {}
|
||||
mul_saturate::mul_saturate(core* core) :
|
||||
common(core),
|
||||
lra(m_core.lra) {}
|
||||
|
||||
lbool mul_saturate::saturate() {
|
||||
lra.push();
|
||||
for (auto j : c().m_to_refine) {
|
||||
auto& m = c().emons()[j];
|
||||
for (auto& con : lra.constraints().active()) {
|
||||
for (auto v : m.vars()) {
|
||||
for (auto [coeff, u] : con.coeffs()) {
|
||||
if (u == v) {
|
||||
// add new constraint
|
||||
// multiply by remaining vars
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// record new monomials that are created and recursively down-saturate with respect to these.
|
||||
|
||||
auto st = lra.solve();
|
||||
lbool r = l_undef;
|
||||
if (st == lp::lp_status::INFEASIBLE) {
|
||||
// now we need to filter new constraints into bounds and old constraints.
|
||||
|
||||
r = l_false;
|
||||
}
|
||||
if (st == lp::lp_status::OPTIMAL || st == lp::lp_status::FEASIBLE) {
|
||||
// TODO: check model just in case it got lucky.
|
||||
}
|
||||
lra.pop(1);
|
||||
return r;
|
||||
}
|
||||
|
||||
lp::lar_base_constraint* mul_saturate::multiply_constraint(lp::lar_base_constraint const& c, monic const& m, lpvar x) {
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,9 +7,14 @@
|
|||
namespace nla {
|
||||
|
||||
class core;
|
||||
class lar_solver;
|
||||
class mul_saturate : common {
|
||||
lp::lar_solver& lra;
|
||||
lp::lar_base_constraint* multiply_constraint(lp::lar_base_constraint const& c, monic const& m, lpvar x);
|
||||
public:
|
||||
mul_saturate(core* core);
|
||||
|
||||
lbool saturate();
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue