3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 18:31:49 +00:00

move remove thread unsafe increment to num_iterations, use num_rounds

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-02-01 10:38:24 -08:00
parent ece041baf8
commit 615da0e3fb

View file

@ -101,20 +101,22 @@ namespace smt {
};
std::mutex mux;
unsigned num_iterations = 0;
auto worker_thread = [&](int i) {
try {
IF_VERBOSE(1, verbose_stream() << "thread " << i << "\n";);
context& pctx = *pctxs[i];
ast_manager& pm = *pms[i];
expr_ref_vector lasms(pasms[i]);
expr_ref c(pm);
pctx.get_fparams().m_max_conflicts = max_conflicts;
if (num_iterations++ > 0) {
if (num_rounds > 0) {
cube(pctx, lasms, c);
}
IF_VERBOSE(1, verbose_stream() << "(smt.thread " << i;
if (num_rounds > 0) verbose_stream() << " :round " << num_rounds;
if (c) verbose_stream() << " :cube: " << c;
verbose_stream() << ")\n";);
lbool r = pctx.check(lasms.size(), lasms.c_ptr());
if (r == l_undef && pctx.m_num_conflicts >= max_conflicts) {