Skip to content

Commit 0b06a9b

Browse files
fix minor version numbering
Signed-off-by: Nikolaj Bjorner <[email protected]>
1 parent 3eac4a4 commit 0b06a9b

File tree

3 files changed

+25
-9
lines changed

3 files changed

+25
-9
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ if (POLICY CMP0042)
1111
endif()
1212

1313
set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cxx_compiler_flags_overrides.cmake")
14-
project(Z3 VERSION 4.8.9.7 LANGUAGES CXX)
14+
project(Z3 VERSION 4.8.9.0 LANGUAGES CXX)
1515

1616
################################################################################
1717
# Project version

src/nlsat/nlsat_explain.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,9 +1354,9 @@ namespace nlsat {
13541354
var max = max_var(num, ls);
13551355
SASSERT(max != null_var);
13561356
normalize(m_core2, max);
1357-
TRACE("nlsat_explain", tout << "core after normalization\n"; display(tout, m_core2) << "\n";);
1357+
TRACE("nlsat_explain", display(tout << "core after normalization\n", m_core2) << "\n";);
13581358
simplify(m_core2, max);
1359-
TRACE("nlsat_explain", tout << "core after simplify\n"; display(tout, m_core2) << "\n";);
1359+
TRACE("nlsat_explain", display(tout << "core after simplify\n", m_core2) << "\n";);
13601360
main(m_core2.size(), m_core2.c_ptr());
13611361
m_core2.reset();
13621362
}

src/nlsat/nlsat_solver.cpp

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ namespace nlsat {
186186
bool m_inline_vars;
187187
bool m_log_lemmas;
188188
unsigned m_max_conflicts;
189+
unsigned m_lemma_count;
189190

190191
// statistics
191192
unsigned m_conflicts;
@@ -218,6 +219,7 @@ namespace nlsat {
218219
updt_params(p);
219220
reset_statistics();
220221
mk_true_bvar();
222+
m_lemma_count = 0;
221223
}
222224

223225
~imp() {
@@ -738,7 +740,7 @@ namespace nlsat {
738740
display_smt2(out);
739741
out << "(assert (not ";
740742
display_smt2(out, cls) << "))\n";
741-
display(out << "(echo \"", cls) << "\")\n";
743+
display(out << "(echo \"#" << m_lemma_count << " ", cls) << "\")\n";
742744
out << "(check-sat)\n(reset)\n";
743745
}
744746

@@ -750,9 +752,10 @@ namespace nlsat {
750752
for (unsigned i = 0; i < num_lits; i++)
751753
inc_ref(lits[i]);
752754
inc_ref(a);
753-
TRACE("nlsat_sort", tout << "mk_clause:\n"; display(tout, *cls); tout << "\n";);
755+
++m_lemma_count;
756+
TRACE("nlsat_sort", display(tout << "mk_clause:\n", *cls) << "\n";);
754757
std::sort(cls->begin(), cls->end(), lit_lt(*this));
755-
TRACE("nlsat_sort", tout << "after sort:\n"; display(tout, *cls); tout << "\n";);
758+
TRACE("nlsat_sort", display(tout << "#" << m_lemma_count << " after sort:\n", *cls) << "\n";);
756759
if (learned && m_log_lemmas) {
757760
log_lemma(std::cout, *cls);
758761
}
@@ -1599,7 +1602,7 @@ namespace nlsat {
15991602
}
16001603

16011604
void resolve_lazy_justification(bool_var b, lazy_justification const & jst) {
1602-
TRACE("nlsat_resolve", tout << "resolving lazy_justification for b: " << b << "\n";);
1605+
TRACE("nlsat_resolve", tout << "resolving lazy_justification for b" << b << "\n";);
16031606
unsigned sz = jst.num_lits();
16041607

16051608
// Dump lemma as Mathematica formula that must be true,
@@ -1785,7 +1788,7 @@ namespace nlsat {
17851788
if (t.m_kind == trail::BVAR_ASSIGNMENT) {
17861789
bool_var b = t.m_b;
17871790
if (is_marked(b)) {
1788-
TRACE("nlsat_resolve", tout << "found marked bool_var: " << b << "\n"; display_atom(tout, b) << "\n";);
1791+
TRACE("nlsat_resolve", tout << "found marked: b" << b << "\n"; display_atom(tout, b) << "\n";);
17891792
m_num_marks--;
17901793
reset_mark(b);
17911794
justification jst = m_justifications[b];
@@ -2737,7 +2740,7 @@ namespace nlsat {
27372740
break;
27382741
case justification::LAZY: {
27392742
lazy_justification const& lz = *j.get_lazy();
2740-
display(out, lz.num_lits(), lz.lits()) << "\n";
2743+
display_not(out, lz.num_lits(), lz.lits()) << "\n";
27412744
for (unsigned i = 0; i < lz.num_clauses(); ++i) {
27422745
display(out, lz.clause(i)) << "\n";
27432746
}
@@ -3015,6 +3018,19 @@ namespace nlsat {
30153018
std::ostream& display(std::ostream & out, unsigned num, literal const * ls) const {
30163019
return display(out, num, ls, m_display_var);
30173020
}
3021+
3022+
std::ostream& display_not(std::ostream & out, unsigned num, literal const * ls, display_var_proc const & proc) const {
3023+
for (unsigned i = 0; i < num; i++) {
3024+
if (i > 0)
3025+
out << " or ";
3026+
display(out, ~ls[i], proc);
3027+
}
3028+
return out;
3029+
}
3030+
3031+
std::ostream& display_not(std::ostream & out, unsigned num, literal const * ls) const {
3032+
return display_not(out, num, ls, m_display_var);
3033+
}
30183034

30193035
std::ostream& display(std::ostream & out, scoped_literal_vector const & cs) {
30203036
return display(out, cs.size(), cs.c_ptr(), m_display_var);

0 commit comments

Comments
 (0)