mirror of
https://github.com/Z3Prover/z3
synced 2025-04-14 04:48:45 +00:00
dbl-max
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
42cc7c7f87
commit
d684d4fce0
|
@ -1070,7 +1070,7 @@ namespace sat {
|
|||
m_overflow = true;
|
||||
return UINT_MAX;
|
||||
}
|
||||
return static_cast<unsigned>(abs(c));
|
||||
return static_cast<unsigned>(std::abs(c));
|
||||
}
|
||||
|
||||
int ba_solver::get_int_coeff(bool_var v) const {
|
||||
|
@ -1376,16 +1376,16 @@ namespace sat {
|
|||
unsigned acoeff = get_abs_coeff(v);
|
||||
if (lvl(lit) == m_conflict_lvl) {
|
||||
if (m_lemma[0] == null_literal) {
|
||||
asserting_coeff = abs(coeff);
|
||||
asserting_coeff = std::abs(coeff);
|
||||
slack -= asserting_coeff;
|
||||
m_lemma[0] = ~lit;
|
||||
}
|
||||
else {
|
||||
++num_skipped;
|
||||
if (asserting_coeff < abs(coeff)) {
|
||||
if (asserting_coeff < std::abs(coeff)) {
|
||||
m_lemma[0] = ~lit;
|
||||
slack -= (abs(coeff) - asserting_coeff);
|
||||
asserting_coeff = abs(coeff);
|
||||
slack -= (std::abs(coeff) - asserting_coeff);
|
||||
asserting_coeff = std::abs(coeff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2082,7 +2082,7 @@ namespace sat {
|
|||
if (inconsistent()) {
|
||||
TRACE("sat", tout << "inconsistent: " << m_cube_state.m_cube << "\n";);
|
||||
m_cube_state.m_freevars_threshold = m_freevars.size();
|
||||
m_cube_state.m_psat_threshold = m_config.m_cube_cutoff == adaptive_psat_cutoff ? psat_heur() : DBL_MAX; // MN. only compute PSAT if enabled
|
||||
m_cube_state.m_psat_threshold = m_config.m_cube_cutoff == adaptive_psat_cutoff ? psat_heur() : dbl_max; // MN. only compute PSAT if enabled
|
||||
m_cube_state.inc_conflict();
|
||||
if (!backtrack(m_cube_state.m_cube, m_cube_state.m_is_decision)) return l_false;
|
||||
continue;
|
||||
|
@ -2119,7 +2119,7 @@ namespace sat {
|
|||
return l_undef;
|
||||
}
|
||||
int prev_nfreevars = m_freevars.size();
|
||||
double prev_psat = m_config.m_cube_cutoff == adaptive_psat_cutoff ? psat_heur() : DBL_MAX; // MN. only compute PSAT if enabled
|
||||
double prev_psat = m_config.m_cube_cutoff == adaptive_psat_cutoff ? psat_heur() : dbl_max; // MN. only compute PSAT if enabled
|
||||
literal lit = choose();
|
||||
if (inconsistent()) {
|
||||
TRACE("sat", tout << "inconsistent: " << m_cube_state.m_cube << "\n";);
|
||||
|
|
|
@ -60,6 +60,8 @@ namespace sat {
|
|||
return out;
|
||||
}
|
||||
|
||||
const double dbl_max = 100000000.0;
|
||||
|
||||
class lookahead {
|
||||
solver& m_s;
|
||||
unsigned m_num_vars;
|
||||
|
@ -186,7 +188,7 @@ namespace sat {
|
|||
m_is_decision.reset();
|
||||
m_cube.reset();
|
||||
m_freevars_threshold = 0;
|
||||
m_psat_threshold = 100000000.0;
|
||||
m_psat_threshold = dbl_max;
|
||||
reset_stats();
|
||||
}
|
||||
void reset_stats() { m_conflicts = 0; m_cutoffs = 0; }
|
||||
|
|
Loading…
Reference in a new issue