Skip to content

Commit 50deece

Browse files
fix #7098
1 parent 99ebbd6 commit 50deece

File tree

2 files changed

+21
-12
lines changed

2 files changed

+21
-12
lines changed

src/smt/smt_context_pp.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ namespace smt {
132132

133133
void context::display_literal_info(std::ostream & out, literal l) const {
134134
smt::display_compact(out, l, m_bool_var2expr.data());
135-
display_literal_smt2(out, l);
135+
display_literal_smt2(out << " " << l << ": ", l);
136136
out << "relevant: " << is_relevant(bool_var2expr(l.var())) << ", val: " << get_assignment(l) << "\n";
137137
}
138138

src/smt/theory_pb.cpp

+20-11
Original file line numberDiff line numberDiff line change
@@ -1807,7 +1807,7 @@ namespace smt {
18071807

18081808
bool theory_pb::resolve_conflict(card& c, literal_vector const& confl) {
18091809

1810-
TRACE("pb", display(tout, c, true); );
1810+
TRACE("pb", display(tout << "resolve conflict\n", c, true); );
18111811

18121812
bool_var v;
18131813
m_conflict_lvl = 0;
@@ -1839,8 +1839,19 @@ namespace smt {
18391839
literal conseq = ~confl[2];
18401840
int bound = 1;
18411841

1842+
auto clear_marks = [&]() {
1843+
while (m_num_marks > 0 && idx > 0) {
1844+
v = lits[idx].var();
1845+
if (ctx.is_marked(v)) {
1846+
ctx.unset_mark(v);
1847+
}
1848+
--idx;
1849+
}
1850+
};
1851+
18421852
while (m_num_marks > 0) {
18431853

1854+
TRACE("pb", tout << "conseq: " << conseq << "\n");
18441855
v = conseq.var();
18451856

18461857
int offset = get_abs_coeff(v);
@@ -1850,13 +1861,7 @@ namespace smt {
18501861
}
18511862
SASSERT(validate_lemma());
18521863
if (offset > 1000) {
1853-
while (m_num_marks > 0 && idx > 0) {
1854-
v = lits[idx].var();
1855-
if (ctx.is_marked(v)) {
1856-
ctx.unset_mark(v);
1857-
}
1858-
--idx;
1859-
}
1864+
clear_marks();
18601865
return false;
18611866
}
18621867

@@ -1884,8 +1889,11 @@ namespace smt {
18841889
clause& cls = *js.get_clause();
18851890
justification* cjs = cls.get_justification();
18861891
unsigned num_lits = cls.get_num_literals();
1887-
if (cjs && typeid(smt::unit_resolution_justification) == typeid(*cjs))
1888-
;
1892+
CTRACE("pb", cjs, tout << (typeid(smt::unit_resolution_justification) == typeid(*cjs)) << "\n");
1893+
if (cjs && typeid(smt::unit_resolution_justification) == typeid(*cjs)) {
1894+
clear_marks();
1895+
return false;
1896+
}
18891897
else if (cjs && !is_proof_justification(*cjs)) {
18901898
TRACE("pb", tout << "not processing justification over: " << conseq << " " << typeid(*cjs).name() << "\n";);
18911899
break;
@@ -1954,7 +1962,8 @@ namespace smt {
19541962
while (true) {
19551963
conseq = lits[idx];
19561964
v = conseq.var();
1957-
if (ctx.is_marked(v)) break;
1965+
if (ctx.is_marked(v))
1966+
break;
19581967
SASSERT(idx > 0);
19591968
--idx;
19601969
}

0 commit comments

Comments
 (0)