mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
also deal with initializing boolean variables in smt context
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
39f73fa595
commit
f84de9400e
3 changed files with 13 additions and 14 deletions
|
@ -99,6 +99,7 @@ namespace sat {
|
|||
while (s.rlimit().inc() && st == l_undef) {
|
||||
if (inconsistent() && !m_decisions.empty()) do_pop();
|
||||
else if (inconsistent()) st = l_false;
|
||||
else if (should_restart()) restart();
|
||||
else if (should_backjump()) st = do_backjump();
|
||||
else st = decide();
|
||||
}
|
||||
|
@ -276,9 +277,6 @@ namespace sat {
|
|||
init_runs();
|
||||
init_phase();
|
||||
}
|
||||
if (false && should_restart()) {
|
||||
restart();
|
||||
}
|
||||
}
|
||||
|
||||
bool unit_walk::should_restart() {
|
||||
|
@ -287,9 +285,7 @@ namespace sat {
|
|||
++m_luby_index;
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void unit_walk::restart() {
|
||||
|
@ -328,9 +324,9 @@ namespace sat {
|
|||
}
|
||||
|
||||
void unit_walk::propagate() {
|
||||
while (m_qhead < m_trail.size() && !inconsistent())
|
||||
propagate(choose_literal());
|
||||
// IF_VERBOSE(1, verbose_stream() << m_trail.size() << " " << inconsistent() << "\n";);
|
||||
while (m_qhead < m_trail.size() && !inconsistent()) {
|
||||
propagate(m_trail[m_qhead++]);
|
||||
}
|
||||
}
|
||||
|
||||
std::ostream& unit_walk::display(std::ostream& out) const {
|
||||
|
@ -495,10 +491,6 @@ namespace sat {
|
|||
<< ")\n";);
|
||||
}
|
||||
|
||||
literal unit_walk::choose_literal() {
|
||||
return m_trail[m_qhead++];
|
||||
}
|
||||
|
||||
void unit_walk::set_conflict(literal l1, literal l2) {
|
||||
set_conflict();
|
||||
}
|
||||
|
|
|
@ -91,7 +91,6 @@ namespace sat {
|
|||
void flip_phase(literal l);
|
||||
void propagate();
|
||||
void propagate(literal lit);
|
||||
literal choose_literal();
|
||||
void set_conflict(literal l1, literal l2);
|
||||
void set_conflict(literal l1, literal l2, literal l3);
|
||||
void set_conflict(clause const& c);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue