mirror of
https://github.com/Z3Prover/z3
synced 2025-04-15 13:28:47 +00:00
initialize glue in constructor to ensure it gets set
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
f7e14b3283
commit
d8a2e9d008
|
@ -1514,21 +1514,16 @@ void ast_manager::compress_ids() {
|
||||||
ptr_vector<ast> asts;
|
ptr_vector<ast> asts;
|
||||||
m_expr_id_gen.cleanup();
|
m_expr_id_gen.cleanup();
|
||||||
m_decl_id_gen.cleanup(c_first_decl_id);
|
m_decl_id_gen.cleanup(c_first_decl_id);
|
||||||
ast_table::iterator it = m_ast_table.begin();
|
for (ast* n : m_ast_table) {
|
||||||
ast_table::iterator end = m_ast_table.end();
|
|
||||||
for (; it != end; ++it) {
|
|
||||||
ast * n = *it;
|
|
||||||
if (is_decl(n))
|
if (is_decl(n))
|
||||||
n->m_id = m_decl_id_gen.mk();
|
n->m_id = m_decl_id_gen.mk();
|
||||||
else
|
else
|
||||||
n->m_id = m_expr_id_gen.mk();
|
n->m_id = m_expr_id_gen.mk();
|
||||||
asts.push_back(n);
|
asts.push_back(n);
|
||||||
}
|
}
|
||||||
m_ast_table.finalize();
|
m_ast_table.finalize();
|
||||||
ptr_vector<ast>::iterator it2 = asts.begin();
|
for (ast* a : asts)
|
||||||
ptr_vector<ast>::iterator end2 = asts.end();
|
m_ast_table.insert(a);
|
||||||
for (; it2 != end2; ++it2)
|
|
||||||
m_ast_table.insert(*it2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ast_manager::raise_exception(char const * msg) {
|
void ast_manager::raise_exception(char const * msg) {
|
||||||
|
|
|
@ -33,7 +33,9 @@ namespace sat {
|
||||||
m_used(false),
|
m_used(false),
|
||||||
m_frozen(false),
|
m_frozen(false),
|
||||||
m_reinit_stack(false),
|
m_reinit_stack(false),
|
||||||
m_inact_rounds(0) {
|
m_inact_rounds(0),
|
||||||
|
m_glue(255),
|
||||||
|
m_psm(255) {
|
||||||
memcpy(m_lits, lits, sizeof(literal) * sz);
|
memcpy(m_lits, lits, sizeof(literal) * sz);
|
||||||
mark_strengthened();
|
mark_strengthened();
|
||||||
SASSERT(check_approx());
|
SASSERT(check_approx());
|
||||||
|
|
|
@ -84,9 +84,11 @@ namespace sat {
|
||||||
double m_cube_fraction;
|
double m_cube_fraction;
|
||||||
|
|
||||||
config() {
|
config() {
|
||||||
m_max_hlevel = 50;
|
memset(this, sizeof(*this), 0);
|
||||||
|
m_dl_success = 0.8;
|
||||||
m_alpha = 3.5;
|
m_alpha = 3.5;
|
||||||
m_max_score = 20.0;
|
m_max_score = 20.0;
|
||||||
|
m_max_hlevel = 50;
|
||||||
m_min_cutoff = 30;
|
m_min_cutoff = 30;
|
||||||
m_preselect = false;
|
m_preselect = false;
|
||||||
m_level_cand = 600;
|
m_level_cand = 600;
|
||||||
|
|
|
@ -1762,11 +1762,8 @@ namespace sat {
|
||||||
\brief Compute the psm of all learned clauses.
|
\brief Compute the psm of all learned clauses.
|
||||||
*/
|
*/
|
||||||
void solver::save_psm() {
|
void solver::save_psm() {
|
||||||
clause_vector::iterator it = m_learned.begin();
|
for (clause* cp : m_learned) {
|
||||||
clause_vector::iterator end = m_learned.end();
|
cp->set_psm(psm(*cp));
|
||||||
for (; it != end; ++it) {
|
|
||||||
clause & c = *(*it);
|
|
||||||
c.set_psm(psm(c));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue