mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
deal with compiler warnings and include value exchange prior to final check.
This commit is contained in:
parent
ce615ee116
commit
0e8969ce60
15 changed files with 132 additions and 146 deletions
|
@ -103,13 +103,14 @@ namespace smt {
|
|||
m_smt_plugin->check(fmls, clauses);
|
||||
m_smt_plugin->get_shared_clauses(m_shared_clauses);
|
||||
}
|
||||
else if (!m_parallel_mode)
|
||||
propagate_local_search();
|
||||
else if (m_smt_plugin->completed()) {
|
||||
else if (m_parallel_mode && m_smt_plugin->completed()) {
|
||||
m_smt_plugin->finalize(m_model, m_st);
|
||||
m_smt_plugin = nullptr;
|
||||
m_init_search = false;
|
||||
}
|
||||
else
|
||||
propagate_local_search();
|
||||
|
||||
}
|
||||
|
||||
void theory_sls::pop_scope_eh(unsigned n) {
|
||||
|
@ -152,17 +153,29 @@ namespace smt {
|
|||
}
|
||||
}
|
||||
|
||||
void theory_sls::update_propagation_scope() {
|
||||
if (m_propagation_scope > ctx.get_scope_level() && m_propagation_scope == m_max_propagation_scope) {
|
||||
m_smt_plugin->smt_values_to_sls();
|
||||
}
|
||||
m_propagation_scope = ctx.get_scope_level();
|
||||
m_max_propagation_scope = std::max(m_max_propagation_scope, m_propagation_scope);
|
||||
}
|
||||
|
||||
void theory_sls::propagate_local_search() {
|
||||
if (!m_has_unassigned_clause_after_resolve)
|
||||
return;
|
||||
if (m_parallel_mode || !m_smt_plugin)
|
||||
if (!m_smt_plugin)
|
||||
return;
|
||||
++m_after_resolve_decide_count;
|
||||
if (100 + m_after_resolve_decide_gap > m_after_resolve_decide_count)
|
||||
if (100 + m_after_resolve_decide_gap > m_after_resolve_decide_count) {
|
||||
//update_propagation_scope();
|
||||
return;
|
||||
}
|
||||
m_after_resolve_decide_gap *= 2;
|
||||
if (!shared_clauses_are_true())
|
||||
if (!shared_clauses_are_true()) {
|
||||
update_propagation_scope();
|
||||
return;
|
||||
}
|
||||
m_resolve_count = 0;
|
||||
m_has_unassigned_clause_after_resolve = false;
|
||||
run_guided_sls();
|
||||
|
|
|
@ -73,6 +73,8 @@ namespace smt {
|
|||
unsigned m_after_resolve_decide_count = 0;
|
||||
unsigned m_resolve_count = 0;
|
||||
unsigned m_resolve_gap = 0;
|
||||
unsigned m_max_propagation_scope = 0;
|
||||
unsigned m_propagation_scope = 0;
|
||||
mutable bool m_init_search = false;
|
||||
mutable ::statistics m_st;
|
||||
vector<sat::literal_vector> m_shared_clauses;
|
||||
|
@ -95,6 +97,8 @@ namespace smt {
|
|||
void run_guided_sls();
|
||||
void finalize() const;
|
||||
|
||||
void update_propagation_scope();
|
||||
|
||||
public:
|
||||
theory_sls(context& ctx);
|
||||
~theory_sls() override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue