mirror of
https://github.com/Z3Prover/z3
synced 2025-07-20 11:22:04 +00:00
na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
95e2d174c7
commit
e1edadabec
2 changed files with 1 additions and 10 deletions
|
@ -280,21 +280,15 @@ namespace polysat {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << "vars " << m_vars << " contains: " << m_vars.contains(v) << "\n";
|
|
||||||
|
|
||||||
m_vars.remove(v);
|
m_vars.remove(v);
|
||||||
|
|
||||||
for (auto c : cjust_v)
|
for (auto c : cjust_v)
|
||||||
insert(c);
|
insert(c);
|
||||||
|
|
||||||
std::cout << "try explain v" << v << "\n";
|
|
||||||
|
|
||||||
for (auto* engine : ex_engines)
|
for (auto* engine : ex_engines)
|
||||||
if (engine->try_explain(v, *this))
|
if (engine->try_explain(v, *this))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
std::cout << "try elim v" << v << "\n";
|
|
||||||
|
|
||||||
// No value resolution method was successful => fall back to saturation and variable elimination
|
// No value resolution method was successful => fall back to saturation and variable elimination
|
||||||
while (s.inc()) {
|
while (s.inc()) {
|
||||||
// TODO: as a last resort, substitute v by m_value[v]?
|
// TODO: as a last resort, substitute v by m_value[v]?
|
||||||
|
@ -306,7 +300,6 @@ namespace polysat {
|
||||||
set_bailout();
|
set_bailout();
|
||||||
if (s.is_assigned(v))
|
if (s.is_assigned(v))
|
||||||
m_vars.insert(v);
|
m_vars.insert(v);
|
||||||
std::cout << "vars " << m_vars << "\n";
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -192,7 +192,6 @@ namespace polysat {
|
||||||
|
|
||||||
bool solver::propagate(sat::literal lit, clause& cl) {
|
bool solver::propagate(sat::literal lit, clause& cl) {
|
||||||
SASSERT(cl.size() >= 2);
|
SASSERT(cl.size() >= 2);
|
||||||
std::cout << lit << ": " << cl << "\n";
|
|
||||||
unsigned idx = cl[0] == ~lit ? 1 : 0;
|
unsigned idx = cl[0] == ~lit ? 1 : 0;
|
||||||
SASSERT(cl[1 - idx] == ~lit);
|
SASSERT(cl[1 - idx] == ~lit);
|
||||||
if (m_bvars.is_true(cl[idx]))
|
if (m_bvars.is_true(cl[idx]))
|
||||||
|
@ -636,7 +635,6 @@ namespace polysat {
|
||||||
// - drawback: might have to bail out at boolean resolution
|
// - drawback: might have to bail out at boolean resolution
|
||||||
// Also: maybe we can skip ~L in some cases? but in that case it shouldn't be marked.
|
// Also: maybe we can skip ~L in some cases? but in that case it shouldn't be marked.
|
||||||
//
|
//
|
||||||
std::cout << "ADD extra " << ~lit << "\n";
|
|
||||||
reason_builder.push(~lit);
|
reason_builder.push(~lit);
|
||||||
}
|
}
|
||||||
clause_ref reason = reason_builder.build();
|
clause_ref reason = reason_builder.build();
|
||||||
|
@ -869,7 +867,7 @@ namespace polysat {
|
||||||
for (auto const& wlist : m_pwatch) {
|
for (auto const& wlist : m_pwatch) {
|
||||||
auto n = std::count(wlist.begin(), wlist.end(), sc);
|
auto n = std::count(wlist.begin(), wlist.end(), sc);
|
||||||
if (n > 1)
|
if (n > 1)
|
||||||
std::cout << sc << "\n" << * this << "\n";
|
LOG("violated watch constraint " << sc << "\n" << *this);
|
||||||
VERIFY(n <= 1); // no duplicates in the watchlist
|
VERIFY(n <= 1); // no duplicates in the watchlist
|
||||||
num_watches += n;
|
num_watches += n;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue