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

fix local search initialization of units, encode offset in clauses

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2018-04-28 22:26:01 +02:00
parent 38888b5e5c
commit 2f025f52c0
6 changed files with 47 additions and 18 deletions

View file

@ -5,7 +5,7 @@ def_module_params('parallel',
params=(
('enable', BOOL, False, 'enable parallel solver by default on selected tactics (for QF_BV)'),
('threads.max', UINT, 10000, 'caps maximal number of threads below the number of processors'),
('conquer.batch_size', UINT, 1000, 'number of cubes to batch together for fast conquer'),
('conquer.batch_size', UINT, 100, 'number of cubes to batch together for fast conquer'),
('conquer.restart.max', UINT, 5, 'maximal number of restarts during conquer phase'),
('conquer.delay', UINT, 10, 'delay of cubes until applying conquer'),
('conquer.backtrack_frequency', UINT, 10, 'frequency to apply core minimization during conquer'),

View file

@ -99,6 +99,8 @@ class parallel_tactic : public tactic {
}
}
bool in_shutdown() const { return m_shutdown; }
void add_task(solver_state* task) {
std::lock_guard<std::mutex> lock(m_mutex);
m_tasks.push_back(task);
@ -285,6 +287,7 @@ class parallel_tactic : public tactic {
p.set_uint("restart.max", pp.simplify_restart_max() * mult);
p.set_bool("lookahead_simplify", true);
p.set_bool("retain_blocked_clauses", retain_blocked);
if (m_depth > 1) p.set_uint("bce_delay", 0);
get_solver().updt_params(p);
}
@ -479,8 +482,8 @@ private:
break;
}
if (cubes.size() >= conquer_batch_size() || (!cubes.empty() && m_queue.is_idle())) {
spawn_cubes(s, std::max(2u, width), cubes);
if (cubes.size() >= conquer_batch_size()) {
spawn_cubes(s, 10*width, cubes);
first = false;
cubes.reset();
}
@ -575,6 +578,7 @@ private:
}
catch (z3_exception& ex) {
IF_VERBOSE(1, verbose_stream() << ex.msg() << "\n";);
if (m_queue.in_shutdown()) return;
m_queue.shutdown();
std::lock_guard<std::mutex> lock(m_mutex);
if (ex.has_error_code()) {