mirror of
https://github.com/Z3Prover/z3
synced 2025-08-02 09:20:22 +00:00
add shortcuts for unit assertions, conflicts
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
d73b7267e3
commit
93ee05648e
17 changed files with 55 additions and 94 deletions
|
@ -69,7 +69,7 @@ namespace sat {
|
|||
s.m_drat.add(l, lit, true);
|
||||
s.m_drat.add(~l, lit, true);
|
||||
}
|
||||
s.assign(lit, justification());
|
||||
s.assign_scoped(lit);
|
||||
m_num_assigned++;
|
||||
}
|
||||
}
|
||||
|
@ -77,14 +77,14 @@ namespace sat {
|
|||
else {
|
||||
m_to_assert.reset();
|
||||
s.push();
|
||||
s.assign(l, justification());
|
||||
s.assign_scoped(l);
|
||||
m_counter--;
|
||||
unsigned old_tr_sz = s.m_trail.size();
|
||||
s.propagate(false);
|
||||
if (s.inconsistent()) {
|
||||
// ~l must be true
|
||||
s.pop(1);
|
||||
s.assign(~l, justification());
|
||||
s.assign_scoped(~l);
|
||||
s.propagate(false);
|
||||
return false;
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ namespace sat {
|
|||
s.m_drat.add(l, lit, true);
|
||||
s.m_drat.add(~l, lit, true);
|
||||
}
|
||||
s.assign(lit, justification());
|
||||
s.assign_scoped(lit);
|
||||
m_num_assigned++;
|
||||
}
|
||||
}
|
||||
|
@ -119,13 +119,13 @@ namespace sat {
|
|||
m_counter--;
|
||||
s.push();
|
||||
literal l(v, false);
|
||||
s.assign(l, justification());
|
||||
s.assign_scoped(l);
|
||||
unsigned old_tr_sz = s.m_trail.size();
|
||||
s.propagate(false);
|
||||
if (s.inconsistent()) {
|
||||
// ~l must be true
|
||||
s.pop(1);
|
||||
s.assign(~l, justification());
|
||||
s.assign_scoped(~l);
|
||||
s.propagate(false);
|
||||
m_num_assigned++;
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue