mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
0a0b0a5cc0
commit
5c67c9d907
10 changed files with 38 additions and 16 deletions
|
@ -144,20 +144,30 @@ namespace sat {
|
|||
DEBUG_CODE({
|
||||
// all clauses must be satisfied
|
||||
bool sat = false;
|
||||
for (literal l : it->m_clauses) {
|
||||
bool undef = false;
|
||||
for (literal const& l : it->m_clauses) {
|
||||
if (l == null_literal) {
|
||||
CTRACE("sat", !sat,
|
||||
if (m_solver) m_solver->display(tout);
|
||||
display(tout);
|
||||
for (unsigned v = 0; v < m.size(); ++v) tout << v << ": " << m[v] << "\n";
|
||||
for (literal const& l2 : it->m_clauses) {
|
||||
if (l2 == null_literal) tout << "\n"; else tout << l2 << " ";
|
||||
if (&l == &l2) break;
|
||||
}
|
||||
);
|
||||
SASSERT(sat);
|
||||
SASSERT(sat || undef);
|
||||
sat = false;
|
||||
undef = false;
|
||||
continue;
|
||||
}
|
||||
if (sat)
|
||||
continue;
|
||||
if (value_at(l, m) == l_true)
|
||||
sat = true;
|
||||
switch (value_at(l, m)) {
|
||||
case l_undef: undef = true; break;
|
||||
case l_true: sat = true; break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue