3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-05 23:05:46 +00:00

testing bounds strengthening code

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2021-08-06 17:05:54 -07:00
parent 481e20bc20
commit f47930a4ff
5 changed files with 295 additions and 93 deletions

View file

@ -286,12 +286,10 @@ namespace polysat {
lbool linear_solver::check() {
lbool res = l_true;
m_unsat_f = nullptr;
for (auto* f : m_fix) {
if (!f)
continue;
lbool r = f->make_feasible();
for (auto* fp : m_fix_ptr) {
lbool r = fp->make_feasible();
if (r == l_false) {
m_unsat_f = f;
m_unsat_f = fp;
return r;
}
if (r == l_undef)
@ -313,12 +311,13 @@ namespace polysat {
}
// current value assigned to (linear) variable according to tableau.
rational linear_solver::value(pvar v) {
bool linear_solver::value(pvar v, rational& val) {
unsigned sz = s.size(v);
auto* fp = sz2fixplex(sz);
if (!fp)
return rational::zero();
return fp->get_value(pvar2var(sz, v));
return false;
val = fp->get_value(pvar2var(sz, v));
return true;
}
};