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

adding ema

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2018-05-03 13:23:59 -07:00
parent 96914d8578
commit 43403fafcd
5 changed files with 55 additions and 3 deletions

View file

@ -1415,7 +1415,7 @@ namespace sat {
return l_false;
if (m_conflicts_since_init > m_config.m_max_conflicts)
return l_undef;
if (m_conflicts_since_restart > m_restart_threshold)
if (should_restart())
return l_undef;
if (at_base_lvl()) {
cleanup(); // cleaner may propagate frozen clauses
@ -1828,6 +1828,10 @@ namespace sat {
return ok;
}
bool solver::should_restart() const {
return m_conflicts_since_restart > m_restart_threshold;
}
void solver::restart(bool to_base) {
m_stats.m_restart++;
m_restarts++;

View file

@ -416,6 +416,7 @@ namespace sat {
void mk_model();
bool check_model(model const & m) const;
void restart(bool to_base);
bool should_restart() const;
void sort_watch_lits();
void exchange_par();
lbool check_par(unsigned num_lits, literal const* lits);