Skip to content

Commit

Permalink
fix debug build
Browse files Browse the repository at this point in the history
  • Loading branch information
nunoplopes committed Jun 17, 2022
1 parent 73a24ca commit d9fcfda
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 10 deletions.
1 change: 1 addition & 0 deletions src/ast/ast_smt2_pp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1401,6 +1401,7 @@ std::ostream& operator<<(std::ostream& out, sort_ref_vector const& e) {


#ifdef Z3DEBUG
#include <iostream>
void pp(expr const * n, ast_manager & m) {
std::cout << mk_ismt2_pp(const_cast<expr*>(n), m) << std::endl;
}
Expand Down
4 changes: 0 additions & 4 deletions src/ast/static_features.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,6 @@ void static_features::post_process(expr * e, bool form_ctx, bool or_and_ctx, boo
}

unsigned depth = 0;
unsigned form_depth = 0;
unsigned or_and_depth = 0;
unsigned ite_depth = 0;

auto [form_ctx_new, or_and_ctx_new, ite_ctx_new] = new_ctx(e);
Expand Down Expand Up @@ -533,8 +531,6 @@ void static_features::process_root(expr * e) {
if (num_args == 2)
m_num_bin_clauses++;
unsigned depth = 0;
unsigned form_depth = 0;
unsigned or_and_depth = 0;
for (unsigned i = 0; i < num_args; i++) {
expr * arg = to_app(e)->get_arg(i);
if (m.is_not(arg))
Expand Down
1 change: 1 addition & 0 deletions src/nlsat/nlsat_explain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1883,6 +1883,7 @@ namespace nlsat {
};

#ifdef Z3DEBUG
#include <iostream>
void pp(nlsat::explain::imp & ex, unsigned num, nlsat::literal const * ls) {
ex.display(std::cout, num, ls);
}
Expand Down
3 changes: 1 addition & 2 deletions src/qe/nlqsat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,7 @@ namespace qe {
for (unsigned i = vars.size(); i-- > 0;) {
new_result.reset();
ex.project(vars[i], result.size(), result.data(), new_result);
TRACE("qe", display_project(tout, vars[i], result, new_result););
TRACE("qe", display_project(std::cout, vars[i], result, new_result););
TRACE("qe", display_project(tout, vars[i], result, new_result););
result.swap(new_result);
}
negate_clause(result);
Expand Down
1 change: 1 addition & 0 deletions src/solver/assertions/asserted_formulas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,7 @@ unsigned asserted_formulas::get_total_size() const {


#ifdef Z3DEBUG
#include <iostream>
void pp(asserted_formulas & f) {
f.display(std::cout);
}
Expand Down
8 changes: 4 additions & 4 deletions src/tactic/fd_solver/smtfd_solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1756,14 +1756,14 @@ namespace smtfd {
expr_ref val0 = (*m_model)(a);
expr_ref val1 = (*m_model)(abs(a));
if (is_ground(a) && val0 != val1 && val0->get_sort() == val1->get_sort()) {
std::cout << mk_bounded_pp(a, m, 2) << " := " << val0 << " " << val1 << "\n";
//std::cout << mk_bounded_pp(a, m, 2) << " := " << val0 << " " << val1 << "\n";
found_bad = true;
}
}
if (found_bad) {
std::cout << "core: " << core << "\n";
std::cout << *m_model.get() << "\n";
exit(0);
//std::cout << "core: " << core << "\n";
//std::cout << *m_model.get() << "\n";
UNREACHABLE();
});

if (!has_q) {
Expand Down
1 change: 1 addition & 0 deletions src/util/params.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,7 @@ void params::set_sym(char const * k, symbol const & v) {
}

#ifdef Z3DEBUG
#include <iostream>
void pp(params_ref const & p) {
std::cout << p << std::endl;
}
Expand Down
3 changes: 3 additions & 0 deletions src/util/small_object_allocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ Revision History:
#include "util/util.h"
#include "util/vector.h"
#include<iomanip>
#ifdef Z3DEBUG
# include <iostream>
#endif

small_object_allocator::small_object_allocator(char const * id) {
for (unsigned i = 0; i < NUM_SLOTS; i++) {
Expand Down

0 comments on commit d9fcfda

Please sign in to comment.