mirror of
https://github.com/Z3Prover/z3
synced 2025-05-08 00:05:46 +00:00
Fix cleanup/initialization of sat::simplifier. Relates to #570.
This commit is contained in:
parent
6204f67d38
commit
890142ef96
6 changed files with 119 additions and 89 deletions
|
@ -95,7 +95,7 @@ namespace sat {
|
|||
if (updt_cache)
|
||||
cache_bins(l, old_tr_sz);
|
||||
s.pop(1);
|
||||
|
||||
|
||||
literal_vector::iterator it = m_to_assert.begin();
|
||||
literal_vector::iterator end = m_to_assert.end();
|
||||
for (; it != end; ++it) {
|
||||
|
@ -178,10 +178,10 @@ namespace sat {
|
|||
m_num_assigned(p.m_num_assigned) {
|
||||
m_watch.start();
|
||||
}
|
||||
|
||||
|
||||
~report() {
|
||||
m_watch.stop();
|
||||
IF_VERBOSE(SAT_VB_LVL,
|
||||
IF_VERBOSE(SAT_VB_LVL,
|
||||
verbose_stream() << " (sat-probing :probing-assigned "
|
||||
<< (m_probing.m_num_assigned - m_num_assigned)
|
||||
<< " :cost " << m_probing.m_counter;
|
||||
|
@ -189,7 +189,7 @@ namespace sat {
|
|||
verbose_stream() << mem_stat() << " :time " << std::fixed << std::setprecision(2) << m_watch.get_seconds() << ")\n";);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
bool probing::operator()(bool force) {
|
||||
if (!m_probing)
|
||||
return true;
|
||||
|
@ -200,8 +200,8 @@ namespace sat {
|
|||
CASSERT("probing", s.check_invariant());
|
||||
if (!force && m_counter > 0)
|
||||
return true;
|
||||
|
||||
if (m_probing_cache && memory::get_allocation_size() > m_probing_cache_limit)
|
||||
|
||||
if (m_probing_cache && memory::get_allocation_size() > m_probing_cache_limit)
|
||||
m_cached_bins.finalize();
|
||||
|
||||
report rpt(*this);
|
||||
|
@ -256,14 +256,14 @@ namespace sat {
|
|||
}
|
||||
|
||||
void probing::free_memory() {
|
||||
m_assigned.cleanup();
|
||||
m_assigned.finalize();
|
||||
m_to_assert.finalize();
|
||||
}
|
||||
|
||||
|
||||
void probing::collect_statistics(statistics & st) const {
|
||||
st.update("probing assigned", m_num_assigned);
|
||||
}
|
||||
|
||||
|
||||
void probing::reset_statistics() {
|
||||
m_num_assigned = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue