3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 09:05:31 +00:00

fix bug in core generation in legacy core: it ignores complementary literals

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2014-09-14 13:06:01 -07:00
parent a96fa0c555
commit 73070585b8
8 changed files with 25 additions and 21 deletions

View file

@ -948,6 +948,7 @@ namespace sat {
}
void solver::init_search() {
m_model_is_current = false;
m_phase_counter = 0;
m_phase_cache_on = false;
m_conflicts_since_restart = 0;
@ -1036,6 +1037,7 @@ namespace sat {
void solver::mk_model() {
m_model.reset();
m_model_is_current = true;
unsigned num = num_vars();
m_model.resize(num, l_undef);
for (bool_var v = 0; v < num; v++) {
@ -1738,6 +1740,7 @@ namespace sat {
m_mus(); // ignore return value on cancelation.
m_model.reset();
m_model.append(m_mus.get_model());
m_model_is_current = true;
}
}

View file

@ -76,8 +76,9 @@ namespace sat {
random_gen m_rand;
clause_allocator m_cls_allocator;
cleaner m_cleaner;
model m_model;
model m_model;
model_converter m_mc;
bool m_model_is_current;
simplifier m_simplifier;
scc m_scc;
asymm_branch m_asymm_branch;
@ -270,6 +271,7 @@ namespace sat {
public:
lbool check(unsigned num_lits = 0, literal const* lits = 0);
model const & get_model() const { return m_model; }
bool model_is_current() const { return m_model_is_current; }
literal_vector const& get_core() const { return m_core; }
model_converter const & get_model_converter() const { return m_mc; }