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

fix drat for lookahead, fixes for binary drat format

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-01-31 14:58:51 -08:00
parent cda78d8d0b
commit 1e90be62bc
4 changed files with 21 additions and 18 deletions

View file

@ -330,6 +330,7 @@ private:
volatile bool m_has_undef;
bool m_allsat;
unsigned m_num_unsat;
unsigned m_last_depth;
int m_exn_code;
std::string m_exn_msg;
@ -340,7 +341,8 @@ private:
m_has_undef = false;
m_allsat = false;
m_branches = 0;
m_num_unsat = 0;
m_num_unsat = 0;
m_last_depth = 0;
m_backtrack_frequency = pp.conquer_backtrack_frequency();
m_conquer_delay = pp.conquer_delay();
m_exn_code = 0;
@ -350,9 +352,10 @@ private:
void log_branches(lbool status) {
IF_VERBOSE(0, verbose_stream() << "(tactic.parallel :progress " << m_progress << "% ";
if (status == l_true) verbose_stream() << ":status sat ";
if (status == l_undef) verbose_stream() << ":status unknown ";
verbose_stream() << ":closed " << m_num_unsat << " :open " << m_branches << ")\n";);
if (status == l_true) verbose_stream() << ":status sat";
if (status == l_undef) verbose_stream() << ":status unknown";
if (m_num_unsat > 0) verbose_stream() << " :closed " << m_num_unsat << "@" << m_last_depth;
verbose_stream() << " :open " << m_branches << ")\n";);
}
void add_branches(unsigned b) {
@ -405,13 +408,14 @@ private:
}
}
void inc_unsat() {
void inc_unsat(solver_state& s) {
std::lock_guard<std::mutex> lock(m_mutex);
++m_num_unsat;
m_last_depth = s.get_depth();
}
void report_unsat(solver_state& s) {
inc_unsat();
inc_unsat(s);
close_branch(s, l_false);
if (s.has_assumptions()) {
expr_ref_vector core(s.m());
@ -489,7 +493,7 @@ private:
IF_VERBOSE(0, verbose_stream() << "(tactic.parallel :backtrack " << cutoff << " -> " << c.size() << ")\n");
cutoff = c.size();
}
inc_unsat();
inc_unsat(s);
log_branches(l_false);
break;