3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 17:45:32 +00:00

separate out search throttle

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2021-04-17 14:36:50 -07:00
parent 0d65b19c20
commit 981839ee73
2 changed files with 14 additions and 0 deletions

View file

@ -88,6 +88,13 @@ namespace polysat {
}
}
#endif
bool solver::should_search() {
return
m_lim.inc() &&
(m_stats.m_num_conflicts < m_max_conflicts) &&
(m_stats.m_num_decisions < m_max_decisions);
}
lbool solver::check_sat() {
TRACE("polysat", tout << "check\n";);

View file

@ -17,6 +17,7 @@ Author:
--*/
#pragma once
#include <limits>
#include "util/statistics.h"
#include "math/polysat/constraint.h"
#include "math/polysat/eq_constraint.h"
@ -54,6 +55,9 @@ namespace polysat {
var_queue m_free_vars;
stats m_stats;
uint64_t m_max_conflicts { std::numeric_limits<uint64_t>::max() };
uint64_t m_max_decisions { std::numeric_limits<uint64_t>::max() };
// Per constraint state
scoped_ptr_vector<constraint> m_constraints;
scoped_ptr_vector<constraint> m_redundant;
@ -153,6 +157,9 @@ namespace polysat {
bool is_assigned(pvar v) const { return !m_justification[v].is_unassigned(); }
bool should_search();
void propagate(pvar v);
void propagate(pvar v, rational const& val, constraint& c);
void erase_watch(pvar v, constraint& c);