3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-04 02:10:23 +00:00

Centralize and document TRACE tags using X-macros (#7657)

* Introduce X-macro-based trace tag definition
- Created trace_tags.def to centralize TRACE tag definitions
- Each tag includes a symbolic name and description
- Set up enum class TraceTag for type-safe usage in TRACE macros

* Add script to generate Markdown documentation from trace_tags.def
- Python script parses trace_tags.def and outputs trace_tags.md

* Refactor TRACE_NEW to prepend TraceTag and pass enum to is_trace_enabled

* trace: improve trace tag handling system with hierarchical tagging

- Introduce hierarchical tag-class structure: enabling a tag class activates all child tags
- Unify TRACE, STRACE, SCTRACE, and CTRACE under enum TraceTag
- Implement initial version of trace_tag.def using X(tag, tag_class, description)
  (class names and descriptions to be refined in a future update)

* trace: replace all string-based TRACE tags with enum TraceTag
- Migrated all TRACE, STRACE, SCTRACE, and CTRACE macros to use enum TraceTag values instead of raw string literals

* trace : add cstring header

* trace : Add Markdown documentation generation from trace_tags.def via mk_api_doc.py

* trace : rename macro parameter 'class' to 'tag_class' and remove Unicode comment in trace_tags.h.

* trace : Add TODO comment for future implementation of tag_class activation

* trace : Disable code related to tag_class until implementation is ready (#7663).
This commit is contained in:
LeeYoungJoon 2025-05-28 22:31:25 +09:00 committed by GitHub
parent d766292dab
commit 0a93ff515d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
583 changed files with 8698 additions and 7299 deletions

View file

@ -144,7 +144,7 @@ struct aig_manager::imp {
}
void delete_node(aig * n) {
TRACE("aig_lit_count", tout << "deleting: "; display_ref(tout, n); tout << "\n";);
TRACE(aig_lit_count, tout << "deleting: "; display_ref(tout, n); tout << "\n";);
SASSERT(m_num_aigs > 0);
m_num_aigs--;
if (is_var(n)) {
@ -442,7 +442,7 @@ struct aig_manager::imp {
}
void cache_result(expr * t, aig_lit const & r) {
TRACE("expr2aig", tout << "caching:\n" << mk_bounded_pp(t, m.m()) << "\n---> "; m.display_ref(tout, r); tout << "\n";);
TRACE(expr2aig, tout << "caching:\n" << mk_bounded_pp(t, m.m()) << "\n---> "; m.display_ref(tout, r); tout << "\n";);
SASSERT(!m_cache.contains(t));
m.inc_ref(r);
m_cache.insert(t, r);
@ -774,7 +774,7 @@ struct aig_manager::imp {
return n->m_id == 0 ? ast_mng.mk_true() : m.var2expr(n);
}
else {
CTRACE("aig2expr", !is_cached(n), tout << "invalid get_cached for "; m.display_ref(tout, n); tout << "\n";);
CTRACE(aig2expr, !is_cached(n), tout << "invalid get_cached for "; m.display_ref(tout, n); tout << "\n";);
SASSERT(is_cached(n));
return m_cache.get(to_idx(n));
}
@ -867,7 +867,7 @@ struct aig_manager::imp {
}
expr * r = ast_mng.mk_not(ast_mng.mk_or(m_and_children.size(), m_and_children.data()));
cache_result(n, r);
TRACE("aig2expr", tout << "caching AND "; m.display_ref(tout, n); tout << "\n";);
TRACE(aig2expr, tout << "caching AND "; m.display_ref(tout, n); tout << "\n";);
}
void mk_ite(aig * n) {
@ -885,7 +885,7 @@ struct aig_manager::imp {
r = ast_mng.mk_ite(get_cached(c), get_cached(t), get_cached(e));
}
cache_result(n, r);
TRACE("aig2expr", tout << "caching ITE/IFF "; m.display_ref(tout, n); tout << "\n";);
TRACE(aig2expr, tout << "caching ITE/IFF "; m.display_ref(tout, n); tout << "\n";);
}
/**
@ -935,7 +935,7 @@ struct aig_manager::imp {
switch (fr.m_kind){
case AIG_AUX_AND:
// do nothing
TRACE("aig2expr", tout << "skipping aux AND "; m.display_ref(tout, n); tout << "\n";);
TRACE(aig2expr, tout << "skipping aux AND "; m.display_ref(tout, n); tout << "\n";);
break;
case AIG_AND:
mk_and(n);
@ -1136,7 +1136,7 @@ struct aig_manager::imp {
aig_lit a = left(left(n));
aig_lit b = right(left(n));
aig_lit c = right(n);
TRACE("max_sharing",
TRACE(max_sharing,
tout << "trying (and "; m.display_ref(tout, a);
tout << " (and "; m.display_ref(tout, b);
tout << " "; m.display_ref(tout, c);
@ -1149,12 +1149,12 @@ struct aig_manager::imp {
r.invert();
save_result(o, r);
m.dec_ref(bc);
TRACE("max_sharing", tout << "improved:\n"; m.display(tout, o); tout << "---->\n"; m.display(tout, r););
TRACE(max_sharing, tout << "improved:\n"; m.display(tout, o); tout << "---->\n"; m.display(tout, r););
return true;
}
m.dec_ref(bc);
TRACE("max_sharing",
TRACE(max_sharing,
tout << "trying (and "; m.display_ref(tout, a);
tout << " (and "; m.display_ref(tout, c);
tout << " "; m.display_ref(tout, b);
@ -1167,7 +1167,7 @@ struct aig_manager::imp {
r.invert();
save_result(o, r);
m.dec_ref(ac);
TRACE("max_sharing", tout << "improved:\n"; m.display(tout, o); tout << "---->\n"; m.display(tout, r););
TRACE(max_sharing, tout << "improved:\n"; m.display(tout, o); tout << "---->\n"; m.display(tout, r););
return true;
}
m.dec_ref(ac);
@ -1181,7 +1181,7 @@ struct aig_manager::imp {
aig_lit a = left(n);
aig_lit b = left(right(n));
aig_lit c = right(right(n));
TRACE("max_sharing",
TRACE(max_sharing,
tout << "trying (and (and "; m.display_ref(tout, a);
tout << " "; m.display_ref(tout, b);
tout << ") "; m.display_ref(tout, c);
@ -1194,13 +1194,13 @@ struct aig_manager::imp {
r.invert();
save_result(o, r);
m.dec_ref(ab);
TRACE("max_sharing", tout << "improved:\n"; m.display(tout, o); tout << "---->\n"; m.display(tout, r););
TRACE(max_sharing, tout << "improved:\n"; m.display(tout, o); tout << "---->\n"; m.display(tout, r););
return true;
}
m.dec_ref(ab);
aig_lit ac = m.mk_and(a, c);
TRACE("max_sharing",
TRACE(max_sharing,
tout << "trying (and (and "; m.display_ref(tout, a);
tout << " "; m.display_ref(tout, c);
tout << ") "; m.display_ref(tout, b);
@ -1212,7 +1212,7 @@ struct aig_manager::imp {
r.invert();
save_result(o, r);
m.dec_ref(ac);
TRACE("max_sharing", tout << "improved:\n"; m.display(tout, o); tout << "---->\n"; m.display(tout, r););
TRACE(max_sharing, tout << "improved:\n"; m.display(tout, o); tout << "---->\n"; m.display(tout, r););
return true;
}
m.dec_ref(ac);
@ -1266,7 +1266,7 @@ struct aig_manager::imp {
start:
frame & fr = m_frame_stack.back();
aig * n = fr.m_node;
TRACE("max_sharing", tout << "processing "; m.display_ref(tout, n); tout << " idx: " << fr.m_idx << "\n";);
TRACE(max_sharing, tout << "processing "; m.display_ref(tout, n); tout << " idx: " << fr.m_idx << "\n";);
switch (fr.m_idx) {
case 0:
fr.m_idx++;
@ -1289,7 +1289,7 @@ struct aig_manager::imp {
process(p.ptr());
SASSERT(m_result_stack.size() == 1);
aig_lit r = m_result_stack.back();
TRACE("max_sharing", tout << "r.is_null(): " << r.is_null() << "\n";);
TRACE(max_sharing, tout << "r.is_null(): " << r.is_null() << "\n";);
SASSERT(r.is_null() || ref_count(r) >= 1);
reset_cache();
if (r.is_null()) {
@ -1300,7 +1300,7 @@ struct aig_manager::imp {
r.invert();
}
m_result_stack.pop_back();
TRACE("max_sharing", tout << "result:\n"; m.display(tout, r););
TRACE(max_sharing, tout << "result:\n"; m.display(tout, r););
m.dec_ref_result(r);
return r;
}
@ -1348,7 +1348,7 @@ public:
aig_lit mk_and(aig_lit r1, aig_lit r2) {
aig_lit r = mk_node(r1, r2);
TRACE("mk_and_bug",
TRACE(mk_and_bug,
display(tout, r1);
tout << "AND\n";
display(tout, r2);

View file

@ -125,7 +125,7 @@ class add_bounds_tactic : public tactic {
if (proc.m_num_bounds > 0)
g->updt_prec(goal::UNDER);
report_tactic_progress(":added-bounds", proc.m_num_bounds);
TRACE("add_bounds", g->display(tout););
TRACE(add_bounds, g->display(tout););
}
};

View file

@ -76,7 +76,7 @@ struct arith_bounds_tactic : public tactic {
goal_ref s(g); // initialize result.
obj_map<expr, info> lower, upper;
expr* e1, *e2;
TRACE("arith_subsumption", s->display(tout); );
TRACE(arith_subsumption, s->display(tout); );
for (unsigned i = 0; i < s->size(); ++i) {
checkpoint();
expr* lemma = s->form(i);
@ -140,7 +140,7 @@ struct arith_bounds_tactic : public tactic {
}
s->elim_true();
result.push_back(s.get());
TRACE("arith_subsumption", s->display(tout); );
TRACE(arith_subsumption, s->display(tout); );
}
void cleanup() override {}

View file

@ -84,7 +84,7 @@ void bv2int_rewriter_ctx::collect_power2(goal const& s) {
expr* logx = m.mk_fresh_const("log2_v", bv.mk_sort(log2));
logx = bv.mk_zero_extend(num_bits - log2, logx);
m_trail.push_back(logx);
TRACE("bv2int_rewriter", tout << mk_pp(v, m) << " |-> " << mk_pp(logx, m) << "\n";);
TRACE(bv2int_rewriter, tout << mk_pp(v, m) << " |-> " << mk_pp(logx, m) << "\n";);
m_power2.insert(v, logx);
}
}
@ -237,7 +237,7 @@ br_status bv2int_rewriter::mk_mod(expr * s, expr * t, expr_ref & result) {
if (is_ubv2int(s, s1) && is_ubv2int(t, t1)) {
align_sizes(s1, t1, false);
result = m_bv.mk_ubv2int(m_bv.mk_bv_urem(s1, t1));
TRACE("bv2int_rewriter", tout << result << "\n";);
TRACE(bv2int_rewriter, tout << result << "\n";);
return BR_DONE;
}
@ -252,7 +252,7 @@ br_status bv2int_rewriter::mk_mod(expr * s, expr * t, expr_ref & result) {
u1 = mk_bv_add(s1, u1, false);
align_sizes(u1, t1, false);
result = m_bv.mk_ubv2int(m_bv.mk_bv_urem(u1, t1));
TRACE("bv2int_rewriter", tout << result << "\n";);
TRACE(bv2int_rewriter, tout << result << "\n";);
return BR_DONE;
}

View file

@ -315,7 +315,7 @@ bool bv2real_util::mk_is_divisible_by(expr_ref& s, rational const& _overflow) {
SASSERT(overflow.is_int());
SASSERT(overflow.is_pos());
SASSERT(!overflow.is_one());
TRACE("bv2real_rewriter",
TRACE(bv2real_rewriter,
tout << mk_pp(s, m()) << " " << overflow << "\n";);
unsigned power2 = 0;
while ((overflow % rational(2)) == rational(0)) {
@ -336,7 +336,7 @@ bool bv2real_util::mk_is_divisible_by(expr_ref& s, rational const& _overflow) {
}
}
TRACE("bv2real_rewriter",
TRACE(bv2real_rewriter,
tout << mk_pp(s, m()) << " " << overflow << "\n";);
return overflow.is_one();
@ -360,7 +360,7 @@ bv2real_rewriter::bv2real_rewriter(ast_manager& m, bv2real_util& util):
br_status bv2real_rewriter::mk_app_core(func_decl * f, unsigned num_args, expr * const * args, expr_ref & result) {
TRACE("bv2real_rewriter",
TRACE(bv2real_rewriter,
tout << mk_pp(f, m()) << " ";
for (unsigned i = 0; i < num_args; ++i) {
tout << mk_pp(args[i], m()) << " ";
@ -469,7 +469,7 @@ bool bv2real_rewriter::mk_le(expr* s, expr* t, bool is_pos, bool is_neg, expr_re
u().add_side_condition(e4);
}
TRACE("bv2real_rewriter", tout << "mk_le\n";);
TRACE(bv2real_rewriter, tout << "mk_le\n";);
if (is_pos) {
result = le_proxy;
@ -546,7 +546,7 @@ br_status bv2real_rewriter::mk_le(expr * s, expr * t, expr_ref & result) {
expr* e2 = m().mk_or(m().mk_not(gz1), m().mk_not(lz2), ge);
expr* e3 = m().mk_or(m().mk_not(gz2), m().mk_not(lz1), le);
result = m().mk_and(e1, e2, e3);
TRACE("bv2real_rewriter", tout << "\n";);
TRACE(bv2real_rewriter, tout << "\n";);
return BR_DONE;
}
return BR_FAILED;

View file

@ -172,7 +172,7 @@ class degree_shift_tactic : public tactic {
for (auto [f, d, p] : g)
collect(f, visited);
TRACE("degree_shift", display_candidates(tout););
TRACE(degree_shift, display_candidates(tout););
}
void discard_non_candidates() {
@ -257,7 +257,7 @@ class degree_shift_tactic : public tactic {
g->inc_depth();
g->add(mc.get());
result.push_back(g.get());
TRACE("degree_shift", g->display(tout); if (mc) mc->display(tout););
TRACE(degree_shift, g->display(tout); if (mc) mc->display(tout););
}
};

View file

@ -168,7 +168,7 @@ class diff_neq_tactic : public tactic {
unsigned sz = g.size();
for (unsigned i = 0; i < sz; i++) {
expr * f = g.form(i);
TRACE("diff_neq_tactic", tout << "processing: " << mk_ismt2_pp(f, m) << "\n";);
TRACE(diff_neq_tactic, tout << "processing: " << mk_ismt2_pp(f, m) << "\n";);
if (u.is_le(f, lhs, rhs))
process_le(lhs, rhs);
else if (u.is_ge(f, lhs, rhs))
@ -290,14 +290,14 @@ class diff_neq_tactic : public tactic {
while (m_stack.size() < nvars) {
if (!m.inc())
throw tactic_exception(m.limit().get_cancel_msg());
TRACE("diff_neq_tactic", display_model(tout););
TRACE(diff_neq_tactic, display_model(tout););
var x = m_stack.size();
if (extend_model(x))
continue;
if (!resolve_conflict())
return false;
}
TRACE("diff_neq_tactic", display_model(tout););
TRACE(diff_neq_tactic, display_model(tout););
return true;
}
@ -324,7 +324,7 @@ class diff_neq_tactic : public tactic {
return;
}
compile(*g);
TRACE("diff_neq_tactic", g->display(tout); display(tout););
TRACE(diff_neq_tactic, g->display(tout); display(tout););
bool r = search();
report_tactic_progress(":conflicts", m_num_conflicts);
if (r) {

View file

@ -173,7 +173,7 @@ class factor_tactic : public tactic {
scoped_mpz d2(m_qm);
m_expr2poly.to_polynomial(lhs, p1, d1);
m_expr2poly.to_polynomial(rhs, p2, d2);
TRACE("factor_tactic_bug",
TRACE(factor_tactic_bug,
tout << "lhs: " << mk_ismt2_pp(lhs, m) << "\n";
tout << "p1: " << p1 << "\n";
tout << "d1: " << d1 << "\n";
@ -190,10 +190,10 @@ class factor_tactic : public tactic {
if (is_const(p))
return BR_FAILED;
polynomial::factors fs(m_pm);
TRACE("factor_tactic_bug", tout << "p: " << p << "\n";);
TRACE(factor_tactic_bug, tout << "p: " << p << "\n";);
m_pm.factor(p, fs, m_fparams);
SASSERT(fs.distinct_factors() > 0);
TRACE("factor_tactic_bug", tout << "factors:\n"; fs.display(tout); tout << "\n";);
TRACE(factor_tactic_bug, tout << "factors:\n"; fs.display(tout); tout << "\n";);
if (fs.distinct_factors() == 1 && fs.get_degree(0) == 1)
return BR_FAILED;
if (m.is_eq(f)) {

View file

@ -46,7 +46,7 @@ class fix_dl_var_tactic : public tactic {
}
void throw_failed(expr * ctx1, expr * ctx2 = nullptr) {
TRACE("fix_dl_var", tout << mk_ismt2_pp(ctx1, m) << "\n"; if (ctx2) tout << mk_ismt2_pp(ctx2, m) << "\n";);
TRACE(fix_dl_var, tout << mk_ismt2_pp(ctx1, m) << "\n"; if (ctx2) tout << mk_ismt2_pp(ctx2, m) << "\n";);
throw failed();
}
@ -104,7 +104,7 @@ class fix_dl_var_tactic : public tactic {
visit(s, nested);
}
else {
CTRACE("fix_dl_var", m_util.is_add(lhs, t, ms),
CTRACE(fix_dl_var, m_util.is_add(lhs, t, ms),
s = 0;
tout << "is_times_minus_one: " << m_util.is_times_minus_one(ms, s) << "\n";
tout << "is_uninterp(t): " << is_uninterp(t) << "\n";
@ -197,7 +197,7 @@ class fix_dl_var_tactic : public tactic {
app * r1, * r2;
r1 = most_occs(m_non_nested_occs, best1);
r2 = most_occs(m_occs, best2);
TRACE("fix_dl_var",
TRACE(fix_dl_var,
if (r1) {
tout << "r1 occs: " << best1 << "\n";
tout << mk_ismt2_pp(r1, m) << "\n";
@ -246,7 +246,7 @@ class fix_dl_var_tactic : public tactic {
goal_ref_buffer & result) {
tactic_report report("fix-dl-var", *g);
m_produce_models = g->models_enabled();
TRACE("fix_dl_var", g->display(tout););
TRACE(fix_dl_var, g->display(tout););
app * var = is_target(u)(*g);
if (var != nullptr) {

View file

@ -198,7 +198,7 @@ class fm_tactic : public tactic {
void get_units(obj_map<expr, bool>& units) override { units.reset(); }
void operator()(model_ref & md) override {
TRACE("fm_mc", model_v2_pp(tout, *md); display(tout););
TRACE(fm_mc, model_v2_pp(tout, *md); display(tout););
model::scoped_model_completion _sc(*md, true);
//model_evaluator ev(*(md.get()));
//ev.set_model_completion(true);
@ -218,23 +218,23 @@ class fm_tactic : public tactic {
rational val;
expr_ref val_e(m), val_upper_e(m), val_lower_e(m);
bool has_lower = false, has_upper = false;
TRACE("fm_mc", tout << "processing " << x->get_name() << "\n";);
TRACE(fm_mc, tout << "processing " << x->get_name() << "\n";);
for (expr* cl : m_clauses[i]) {
if (!m.inc())
throw tactic_exception(m.limit().get_cancel_msg());
switch (process(x, cl, u, *md, val, val_e)) {
case NONE:
TRACE("fm_mc", tout << "no bound for:\n" << mk_ismt2_pp(cl, m) << "\n";);
TRACE(fm_mc, tout << "no bound for:\n" << mk_ismt2_pp(cl, m) << "\n";);
break;
case LOWER:
TRACE("fm_mc", tout << "lower bound: " << val << " for:\n" << mk_ismt2_pp(cl, m) << "\n";);
TRACE(fm_mc, tout << "lower bound: " << val << " for:\n" << mk_ismt2_pp(cl, m) << "\n";);
if (val_e)
val_lower_e = val_lower_e != nullptr ? mk_max(val_lower_e, val_e) : val_e;
else if (!has_lower || val > lower)
lower = val, has_lower = true;
break;
case UPPER:
TRACE("fm_mc", tout << "upper bound: " << val << " for:\n" << mk_ismt2_pp(cl, m) << "\n";);
TRACE(fm_mc, tout << "upper bound: " << val << " for:\n" << mk_ismt2_pp(cl, m) << "\n";);
if (val_e)
val_upper_e = val_upper_e != nullptr ? mk_min(val_upper_e, val_e) : val_e;
else if (!has_upper || val < upper)
@ -285,10 +285,10 @@ class fm_tactic : public tactic {
else
x_val = u.mk_numeral(rational(0), false);
}
TRACE("fm_mc", tout << x->get_name() << " --> " << mk_ismt2_pp(x_val, m) << "\n";);
TRACE(fm_mc, tout << x->get_name() << " --> " << mk_ismt2_pp(x_val, m) << "\n";);
md->register_decl(x, x_val);
}
TRACE("fm_mc", model_v2_pp(tout, *md););
TRACE(fm_mc, model_v2_pp(tout, *md););
}
@ -519,7 +519,7 @@ class fm_tactic : public tactic {
bool is_linear_ineq(expr * t) const {
m.is_not(t, t);
expr * lhs, * rhs;
TRACE("is_occ_bug", tout << mk_pp(t, m) << "\n";);
TRACE(is_occ_bug, tout << mk_pp(t, m) << "\n";);
if (m_util.is_le(t, lhs, rhs) || m_util.is_ge(t, lhs, rhs)) {
if (!m_util.is_numeral(rhs))
return false;
@ -595,7 +595,7 @@ class fm_tactic : public tactic {
cnstr->m_xs = reinterpret_cast<var*>(mem_xs);
cnstr->m_as = reinterpret_cast<rational*>(mem_as);
for (unsigned i = 0; i < num_vars; i++) {
TRACE("mk_constraint_bug", tout << "xs[" << i << "]: " << xs[i] << "\n";);
TRACE(mk_constraint_bug, tout << "xs[" << i << "]: " << xs[i] << "\n";);
cnstr->m_xs[i] = xs[i];
new (cnstr->m_as + i) rational(as[i]);
}
@ -787,7 +787,7 @@ class fm_tactic : public tactic {
if (c2->m_dead)
continue;
if (subsumes(c, *c2)) {
TRACE("fm_subsumption", display(tout, c); tout << "\nsubsumed:\n"; display(tout, *c2); tout << "\n";);
TRACE(fm_subsumption, display(tout, c); tout << "\nsubsumed:\n"; display(tout, *c2); tout << "\n";);
c2->m_dead = true;
continue;
}
@ -858,7 +858,7 @@ class fm_tactic : public tactic {
expr * f = g.form(i);
if (is_occ(f))
continue;
TRACE("is_occ_bug", tout << "not OCC:\n" << mk_ismt2_pp(f, m) << "\n";);
TRACE(is_occ_bug, tout << "not OCC:\n" << mk_ismt2_pp(f, m) << "\n";);
quick_for_each_expr(proc, visited, f);
}
}
@ -1009,7 +1009,7 @@ class fm_tactic : public tactic {
x = mk_var(t);
SASSERT(m_expr2var.contains(t));
SASSERT(m_var2expr.get(x) == t);
TRACE("to_var_bug", tout << mk_ismt2_pp(t, m) << " --> " << x << "\n";);
TRACE(to_var_bug, tout << mk_ismt2_pp(t, m) << " --> " << x << "\n";);
return x;
}
@ -1108,7 +1108,7 @@ class fm_tactic : public tactic {
}
}
TRACE("to_var_bug", tout << "before mk_constraint: "; for (unsigned i = 0; i < xs.size(); i++) tout << " " << xs[i]; tout << "\n";);
TRACE(to_var_bug, tout << "before mk_constraint: "; for (unsigned i = 0; i < xs.size(); i++) tout << " " << xs[i]; tout << "\n";);
constraint * new_c = mk_constraint(lits.size(),
lits.data(),
@ -1119,7 +1119,7 @@ class fm_tactic : public tactic {
strict,
dep);
TRACE("to_var_bug", tout << "add_constraint: "; display(tout, *new_c); tout << "\n";);
TRACE(to_var_bug, tout << "add_constraint: "; display(tout, *new_c); tout << "\n";);
VERIFY(register_constraint(new_c));
}
@ -1132,7 +1132,7 @@ class fm_tactic : public tactic {
if (is_false(*c)) {
del_constraint(c);
m_inconsistent = true;
TRACE("add_constraint_bug", tout << "is false "; display(tout, *c); tout << "\n";);
TRACE(add_constraint_bug, tout << "is false "; display(tout, *c); tout << "\n";);
return false;
}
@ -1155,7 +1155,7 @@ class fm_tactic : public tactic {
return true;
}
else {
TRACE("add_constraint_bug", tout << "all variables are forbidden "; display(tout, *c); tout << "\n";);
TRACE(add_constraint_bug, tout << "all variables are forbidden "; display(tout, *c); tout << "\n";);
m_new_goal->assert_expr(to_expr(*c), nullptr, c->m_dep);
del_constraint(c);
return false;
@ -1211,7 +1211,7 @@ class fm_tactic : public tactic {
}
// x_cost_lt is not a total order on variables
std::stable_sort(x_cost_vector.begin(), x_cost_vector.end(), x_cost_lt(m_is_int));
TRACE("fm",
TRACE(fm,
for (auto const& [v,c] : x_cost_vector)
tout << "(" << mk_ismt2_pp(m_var2expr.get(v), m) << " " << c << ") ";
tout << "\n";);
@ -1390,7 +1390,7 @@ class fm_tactic : public tactic {
if (new_xs.empty() && (new_c.is_pos() || (!new_strict && new_c.is_zero()))) {
// literal is true
TRACE("fm", tout << "resolution " << x << " consequent literal is always true: \n";
TRACE(fm, tout << "resolution " << x << " consequent literal is always true: \n";
display(tout, l);
tout << "\n";
display(tout, u); tout << "\n";);
@ -1434,7 +1434,7 @@ class fm_tactic : public tactic {
}
if (tautology) {
TRACE("fm", tout << "resolution " << x << " tautology: \n";
TRACE(fm, tout << "resolution " << x << " tautology: \n";
display(tout, l);
tout << "\n";
display(tout, u); tout << "\n";);
@ -1444,7 +1444,7 @@ class fm_tactic : public tactic {
expr_dependency * new_dep = m.mk_join(l.m_dep, u.m_dep);
if (new_lits.empty() && new_xs.empty() && (new_c.is_neg() || (new_strict && new_c.is_zero()))) {
TRACE("fm", tout << "resolution " << x << " inconsistent: \n";
TRACE(fm, tout << "resolution " << x << " inconsistent: \n";
display(tout, l);
tout << "\n";
display(tout, u); tout << "\n";);
@ -1462,7 +1462,7 @@ class fm_tactic : public tactic {
new_strict,
new_dep);
TRACE("fm", tout << "resolution " << x << "\n";
TRACE(fm, tout << "resolution " << x << "\n";
display(tout, l);
tout << "\n";
display(tout, u);
@ -1485,7 +1485,7 @@ class fm_tactic : public tactic {
if (l.empty() || u.empty()) {
// easy case
mark_constraints_dead(x);
TRACE("fm", tout << "variables was eliminated (trivial case)\n";);
TRACE(fm, tout << "variables was eliminated (trivial case)\n";);
return true;
}
@ -1503,7 +1503,7 @@ class fm_tactic : public tactic {
m_counter += num_lowers * num_uppers;
TRACE("fm_bug", tout << "eliminating " << mk_ismt2_pp(m_var2expr.get(x), m) << "\nlowers:\n";
TRACE(fm_bug, tout << "eliminating " << mk_ismt2_pp(m_var2expr.get(x), m) << "\nlowers:\n";
display_constraints(tout, l); tout << "uppers:\n"; display_constraints(tout, u););
unsigned num_old_cnstrs = num_uppers + num_lowers;
@ -1513,7 +1513,7 @@ class fm_tactic : public tactic {
for (unsigned i = 0; i < num_lowers; i++) {
for (unsigned j = 0; j < num_uppers; j++) {
if (m_inconsistent || num_new_cnstrs > limit) {
TRACE("fm", tout << "too many new constraints: " << num_new_cnstrs << "\n";);
TRACE(fm, tout << "too many new constraints: " << num_new_cnstrs << "\n";);
del_constraints(new_constraints.size(), new_constraints.data());
return false;
}
@ -1538,7 +1538,7 @@ class fm_tactic : public tactic {
backward_subsumption(*c);
register_constraint(c);
}
TRACE("fm", tout << "variables was eliminated old: " << num_old_cnstrs << " new_constraints: " << sz << "\n";);
TRACE(fm, tout << "variables was eliminated old: " << num_old_cnstrs << " new_constraints: " << sz << "\n";);
return true;
}
@ -1548,7 +1548,7 @@ class fm_tactic : public tactic {
if (!c->m_dead) {
c->m_dead = true;
expr * new_f = to_expr(*c);
TRACE("fm_bug", tout << "asserting...\n" << mk_ismt2_pp(new_f, m) << "\nnew_dep: " << c->m_dep << "\n";);
TRACE(fm_bug, tout << "asserting...\n" << mk_ismt2_pp(new_f, m) << "\nnew_dep: " << c->m_dep << "\n";);
m_new_goal->assert_expr(new_f, nullptr, c->m_dep);
}
}
@ -1589,7 +1589,7 @@ class fm_tactic : public tactic {
m_new_goal->assert_expr(m.mk_false(), nullptr, m_inconsistent_core);
}
else {
TRACE("fm", display(tout););
TRACE(fm, display(tout););
subsume();
var_vector candidates;
@ -1623,7 +1623,7 @@ class fm_tactic : public tactic {
}
reset_constraints();
result.push_back(m_new_goal.get());
TRACE("fm", m_new_goal->display(tout););
TRACE(fm, m_new_goal->display(tout););
}
void display_constraints(std::ostream & out, constraints const & cs) const {

View file

@ -84,7 +84,7 @@ class lia2card_tactic : public tactic {
else {
return BR_FAILED;
}
TRACE("pbsum", tout << expr_ref(m.mk_app(f, sz, es), m) << " ==>\n" << result << "\n";);
TRACE(pbsum, tout << expr_ref(m.mk_app(f, sz, es), m) << " ==>\n" << result << "\n";);
return BR_DONE;
}
@ -202,7 +202,7 @@ public:
expr_ref b = mk_bounded(axioms, to_app(x), lo.get_unsigned(), hi.get_unsigned());
rep.insert(x, b);
m_bounds.insert(x, bound(lo.get_unsigned(), hi.get_unsigned(), b));
TRACE("pb", tout << "add bound " << lo << " " << hi << ": " << mk_pp(x, m) << "\n";);
TRACE(pb, tout << "add bound " << lo << " " << hi << ": " << mk_pp(x, m) << "\n";);
}
}
for (unsigned i = 0; !g->inconsistent() && i < g->size(); i++) {
@ -330,7 +330,7 @@ public:
conds.pop_back();
}
else {
TRACE("pb", tout << "Can't handle " << mk_pp(x, m) << "\n";);
TRACE(pb, tout << "Can't handle " << mk_pp(x, m) << "\n";);
ok = false;
}
return ok;

View file

@ -94,7 +94,7 @@ class lia2pb_tactic : public tactic {
visitor(imp & o):m_owner(o) {}
void throw_failed(expr * n) {
TRACE("lia2pb", tout << "Failed at:\n" << mk_ismt2_pp(n, m_owner.m) << "\n";);
TRACE(lia2pb, tout << "Failed at:\n" << mk_ismt2_pp(n, m_owner.m) << "\n";);
throw failed();
}
@ -200,7 +200,7 @@ class lia2pb_tactic : public tactic {
for (unsigned i = 0; i < g->size(); ++i)
m_bm(g->form(i), g->dep(i), g->pr(i));
TRACE("lia2pb", m_bm.display(tout););
TRACE(lia2pb, m_bm.display(tout););
// check if there is some variable to be converted
if (!has_target()) {
@ -256,7 +256,7 @@ class lia2pb_tactic : public tactic {
if (dep != nullptr)
m_new_deps.push_back(dep);
}
TRACE("lia2pb", tout << mk_ismt2_pp(x, m) << " -> " << dep << "\n";);
TRACE(lia2pb, tout << mk_ismt2_pp(x, m) << " -> " << dep << "\n";);
subst.insert(x, def, nullptr, dep);
if (m_produce_models) {
gmc->add(x, def);

View file

@ -82,7 +82,7 @@ class nla2bv_tactic : public tactic {
void updt_params(params_ref const& p) {}
void operator()(goal & g, model_converter_ref & mc) {
TRACE("nla2bv", g.display(tout);
TRACE(nla2bv, g.display(tout);
tout << "Muls: " << count_mul(g) << "\n";
);
tactic_report report("nla->bv", g);
@ -99,10 +99,10 @@ class nla2bv_tactic : public tactic {
return;
}
substitute_vars(g);
TRACE("nla2bv", g.display(tout << "substitute vars\n"));
TRACE(nla2bv, g.display(tout << "substitute vars\n"));
reduce_bv2int(g);
reduce_bv2real(g);
TRACE("nla2bv", g.display(tout << "after reduce\n"));
TRACE(nla2bv, g.display(tout << "after reduce\n"));
mc = m_fmc.get();
for (unsigned i = 0; i < m_vars.size(); ++i)
m_fmc->add(m_vars.get(i), m_defs.get(i));
@ -110,8 +110,8 @@ class nla2bv_tactic : public tactic {
m_fmc->hide(m_bv2real.get_aux_decl(i));
}
IF_VERBOSE(TACTIC_VERBOSITY_LVL, verbose_stream() << "(nla->bv :sat-preserving " << m_is_sat_preserving << ")\n";);
TRACE("nla2bv_verbose", g.display(tout));
TRACE("nla2bv", tout << "Muls: " << count_mul(g) << "\n");
TRACE(nla2bv_verbose, g.display(tout));
TRACE(nla2bv, tout << "Muls: " << count_mul(g) << "\n");
g.inc_depth();
if (!is_sat_preserving())
g.updt_prec(goal::UNDER);
@ -134,7 +134,7 @@ class nla2bv_tactic : public tactic {
expr* w = m_bv.mk_ubv2int(m_bv.mk_bv_shl(m_bv.mk_numeral(1, num_bits), v));
m_trail.push_back(w);
m_subst.insert(kv.m_key, w);
TRACE("nla2bv", tout << mk_ismt2_pp(kv.m_key, m_manager) << " " << mk_ismt2_pp(w, m_manager) << "\n";);
TRACE(nla2bv, tout << mk_ismt2_pp(kv.m_key, m_manager) << " " << mk_ismt2_pp(w, m_manager) << "\n";);
}
// eliminate the variables that are power of two.
substitute_vars(g);
@ -174,7 +174,7 @@ class nla2bv_tactic : public tactic {
g.assert_expr(conditions[i]);
set_satisfiability_preserving(false);
}
TRACE("nla2bv",
TRACE(nla2bv,
for (unsigned i = 0; i < sz; ++i) {
tout << mk_ismt2_pp(conditions[i], m_manager) << "\n";
});
@ -229,7 +229,7 @@ class nla2bv_tactic : public tactic {
num_bits = log2(abs(*up - *low)+numeral(1));
}
else {
TRACE("nla2bv", tout << "no bounds for " << mk_ismt2_pp(n, m_manager) << "\n";);
TRACE(nla2bv, tout << "no bounds for " << mk_ismt2_pp(n, m_manager) << "\n";);
set_satisfiability_preserving(false);
}
bv_sort = m_bv.mk_sort(num_bits);
@ -351,7 +351,7 @@ class nla2bv_tactic : public tactic {
m_no_arith = false;
}
else if (n->get_family_id() != m.get_basic_family_id()) {
TRACE("nla2bv", tout << "Not supported: " << mk_ismt2_pp(n, m) << "\n";);
TRACE(nla2bv, tout << "Not supported: " << mk_ismt2_pp(n, m) << "\n";);
m_in_supported_fragment = false;
}
m_imp.update_num_bits(n);

View file

@ -68,7 +68,7 @@ class normalize_bounds_tactic : public tactic {
bool has_lowers() {
for (auto* e : m_bm) {
TRACE("normalize_bounds_tactic",
TRACE(normalize_bounds_tactic,
rational val; bool strict;
tout << mk_ismt2_pp(e, m) << " has_lower: " << m_bm.has_lower(e, val, strict) << " val: " << val << "\n";);
if (is_target(e))
@ -129,7 +129,7 @@ class normalize_bounds_tactic : public tactic {
}
in->update(idx, new_curr, new_pr, in->dep(idx));
}
TRACE("normalize_bounds_tactic", in->display(tout););
TRACE(normalize_bounds_tactic, in->display(tout););
in->inc_depth();
result.push_back(in.get());
}

View file

@ -56,7 +56,7 @@ void pb2bv_model_converter::get_units(obj_map<expr, bool>& units) {
void pb2bv_model_converter::operator()(model_ref & md) {
TRACE("pb2bv", tout << "converting model:\n"; model_v2_pp(tout, *md); display(tout););
TRACE(pb2bv, tout << "converting model:\n"; model_v2_pp(tout, *md); display(tout););
arith_util a_util(m);
for (auto const& kv : m_c2bit) {

View file

@ -52,7 +52,7 @@ public:
}
void throw_non_pb(expr * n) {
TRACE("pb2bv", tout << "Not pseudo-Boolean: " << mk_ismt2_pp(n, m) << "\n";);
TRACE(pb2bv, tout << "Not pseudo-Boolean: " << mk_ismt2_pp(n, m) << "\n";);
throw non_pb(n);
}
@ -227,7 +227,7 @@ private:
if (owner.is_constraint_core(s)) {
owner.convert(to_app(s), m_saved_res, true, false);
t = m_saved_res;
TRACE("pb2bv_convert", tout << mk_ismt2_pp(s, m) << "\n-->\n" << mk_ismt2_pp(t, m) << "\n";);
TRACE(pb2bv_convert, tout << mk_ismt2_pp(s, m) << "\n-->\n" << mk_ismt2_pp(t, m) << "\n";);
return true;
}
return false;
@ -425,13 +425,13 @@ private:
}
}
TRACE("pb2bv_bv", tout << "BV Cardinality: " << mk_ismt2_pp(tmp.back(), m) << std::endl;);
TRACE(pb2bv_bv, tout << "BV Cardinality: " << mk_ismt2_pp(tmp.back(), m) << std::endl;);
r = tmp.back();
return;
}
}
TRACE("pb2bv_bv_detail", tout << "encoding:\n"; display(tout, m_p, m_c););
TRACE(pb2bv_bv_detail, tout << "encoding:\n"; display(tout, m_p, m_c););
// [Leo] improving number of bits needed.
// using (sum-of-coeffs).get_num_bits()
numeral sum;
@ -449,7 +449,7 @@ private:
unsigned bits = sum.get_num_bits();
TRACE("num_bits_bug", tout << "bits: " << bits << " sum: " << sum << " size: " << m_p.size() << "\n";);
TRACE(num_bits_bug, tout << "bits: " << bits << " sum: " << sum << " size: " << m_p.size() << "\n";);
// [Leo]: The following assertion should hold, right?
// I mean, the constraints are normalized, then mo.m_a <= m_c for every monomial in cnstr.
@ -511,7 +511,7 @@ private:
}
void mk_pbc(polynomial & m_p, numeral & m_c, expr_ref & r, bool enable_split) {
TRACE("mk_pbc", display(tout, m_p, m_c); );
TRACE(mk_pbc, display(tout, m_p, m_c); );
if (m_c.is_nonpos()) {
// constraint is equivalent to true.
r = m.mk_true();
@ -532,7 +532,7 @@ private:
it->m_a /= a_gcd;
m_c = ceil(m_c/a_gcd);
}
TRACE("mk_pbc", tout << "GCD = " << a_gcd << "; Normalized: "; display(tout, m_p, m_c); tout << "\n"; );
TRACE(mk_pbc, tout << "GCD = " << a_gcd << "; Normalized: "; display(tout, m_p, m_c); tout << "\n"; );
it = m_p.begin();
numeral a_sum;
for (; it != end; ++it) {
@ -546,10 +546,10 @@ private:
return;
}
polynomial clause;
TRACE("split_bug", display(tout, m_p, m_c););
TRACE(split_bug, display(tout, m_p, m_c););
if (enable_split)
split(m_p, m_c, clause);
TRACE("split_bug", display(tout, m_p, m_c); display(tout, clause, rational(1)););
TRACE(split_bug, display(tout, m_p, m_c); display(tout, clause, rational(1)););
if (clause.empty()) {
bitblast_pbc(m_p, m_c, r);
}
@ -558,7 +558,7 @@ private:
expr_ref r2(m);
bitblast_pbc(m_p, m_c, r1);
bitblast_pbc(clause, numeral(1), r2);
TRACE("split_bug", tout << mk_ismt2_pp(r1, m) << "\nAND\n" << mk_ismt2_pp(r2, m) << "\n";);
TRACE(split_bug, tout << mk_ismt2_pp(r1, m) << "\nAND\n" << mk_ismt2_pp(r2, m) << "\n";);
m_b_rw.mk_and(r1, r2, r);
}
}
@ -582,7 +582,7 @@ private:
}
void throw_non_pb(expr * n) {
TRACE("pb2bv", tout << "Not pseudo-Boolean: " << mk_ismt2_pp(n, m) << "\n";);
TRACE(pb2bv, tout << "Not pseudo-Boolean: " << mk_ismt2_pp(n, m) << "\n";);
throw non_pb(n);
}
@ -590,7 +590,7 @@ private:
// a_0*x_0 + a_0*~y_0 + ... + a_{n-1}*x_{n - 1} + a_{n - 1}*~y_{n - 1} = c
// x_0 = y_0, ..., x_{n - 1} = y_{n - 1}
bool is_eq_vector(polynomial const & p, numeral const & c) {
TRACE("is_eq_vector", display(tout, p, c););
TRACE(is_eq_vector, display(tout, p, c););
unsigned sz = p.size();
if (sz % 2 == 1)
return false; // size must be even
@ -653,7 +653,7 @@ private:
else if ((c.is_zero() && k == LE) ||
(c.is_one() && k == GE)) {
// redundant 0 <= x, 1 >= x
TRACE("pb2bv", tout << "discarding:\n" << mk_ismt2_pp(t, m) << "\n";);
TRACE(pb2bv, tout << "discarding:\n" << mk_ismt2_pp(t, m) << "\n";);
SASSERT(pos);
r = m.mk_true();
}
@ -678,7 +678,7 @@ private:
add_bounds_dependencies(lhs);
if (k == EQ) {
TRACE("pb2bv_bug", tout << "c: " << c << "\n";);
TRACE(pb2bv_bug, tout << "c: " << c << "\n";);
if (!c.is_zero() && !c.is_one()) {
// x = k --> true where k is not 0 or 1
r = pos ? m.mk_false() : m.mk_true();
@ -696,7 +696,7 @@ private:
if (k == LE) {
// x <= c >= 1
if (c >= numeral(1)) {
TRACE("pb2bv", tout << "discarding:\n" << mk_ismt2_pp(t, m) << "\n";);
TRACE(pb2bv, tout << "discarding:\n" << mk_ismt2_pp(t, m) << "\n";);
r = m.mk_true();
return;
}
@ -709,7 +709,7 @@ private:
}
else if (k == GE) {
if (c.is_nonpos()) {
TRACE("pb2bv", tout << "discarding:\n" << mk_ismt2_pp(t, m) << "\n";);
TRACE(pb2bv, tout << "discarding:\n" << mk_ismt2_pp(t, m) << "\n";);
// x >= a <= 0
r = m.mk_true();
return;
@ -721,13 +721,13 @@ private:
}
SASSERT(c.is_one());
}
CTRACE("pb2bv", !(c.is_zero() || c.is_one()),
CTRACE(pb2bv, !(c.is_zero() || c.is_one()),
tout << "BUG: " << mk_ismt2_pp(t, m) << "\nk: " << k << " " << c << "\n";);
SASSERT(c.is_zero() || c.is_one());
SASSERT(!((c.is_zero() && k == GE) ||
(c.is_one() && k == LE)));
CTRACE("pb2bv_bug", !((c.is_zero() && k == LE) || (c.is_one() && k == GE)),
CTRACE(pb2bv_bug, !((c.is_zero() && k == LE) || (c.is_one() && k == GE)),
tout << "c: " << c << ", k: " << k << "\n";
tout << "t: " << mk_ismt2_pp(t, m) << "\n";);
SASSERT((c.is_zero() && k == LE) ||
@ -801,7 +801,7 @@ private:
SASSERT(k == EQ);
if (is_eq_vector(m_p, m_c)) {
TRACE("is_eq_vector", tout << "found eq vector\n";);
TRACE(is_eq_vector, tout << "found eq vector\n";);
unsigned sz = m_p.size();
expr_ref_vector eqs(m);
for (unsigned i = 0; i < sz; i += 2) {
@ -829,7 +829,7 @@ private:
expr_ref r2(m);
mk_pbc(m_p, m_c, r1, false);
mk_pbc(m_p2, m_c2, r2, false);
TRACE("pb2bv_convert", tout << mk_ismt2_pp(t, m) << "\n";
TRACE(pb2bv_convert, tout << mk_ismt2_pp(t, m) << "\n";
display(tout, m_p, m_c);
display(tout, m_p2, m_c2);
tout << "--->\n" << mk_ismt2_pp(r1, m) << "\nAND\n" << mk_ismt2_pp(r2, m) << "\n";);
@ -900,7 +900,7 @@ private:
void operator()(goal_ref const & g,
goal_ref_buffer & result) {
TRACE("pb2bv", g->display(tout););
TRACE(pb2bv, g->display(tout););
fail_if_proof_generation("pb2bv", g);
m_produce_models = g->models_enabled();
m_produce_unsat_cores = g->unsat_core_enabled();
@ -917,7 +917,7 @@ private:
for (unsigned i = 0; i < size; i++)
m_bm(g->form(i), g->dep(i), g->pr(i));
TRACE("pb2bv", m_bm.display(tout););
TRACE(pb2bv, m_bm.display(tout););
try {
quick_pb_check(g);
@ -939,7 +939,7 @@ private:
bool pos;
if (is_constraint(curr, atom, pos)) {
convert(to_app(atom), new_f, pos, true);
TRACE("pb2bv_convert", tout << "pos: " << pos << "\n" << mk_ismt2_pp(atom, m) << "\n--->\n" << mk_ismt2_pp(new_f, m) << "\n";);
TRACE(pb2bv_convert, tout << "pos: " << pos << "\n" << mk_ismt2_pp(atom, m) << "\n--->\n" << mk_ismt2_pp(new_f, m) << "\n";);
}
else {
proof_ref pr(m);

View file

@ -136,7 +136,7 @@ struct has_nlmul {
has_nlmul(ast_manager& m):m(m), a(m) {}
void throw_found(expr* e) {
TRACE("probe", tout << expr_ref(e, m) << ": " << sort_ref(e->get_sort(), m) << "\n";);
TRACE(probe, tout << expr_ref(e, m) << ": " << sort_ref(e->get_sort(), m) << "\n";);
throw found();
}
@ -438,7 +438,7 @@ struct is_non_nira_functor {
is_non_nira_functor(ast_manager & _m, bool _int, bool _real, bool _quant, bool linear):m(_m), u(m), m_int(_int), m_real(_real), m_quant(_quant), m_linear(linear) {}
void throw_found(expr* e) {
TRACE("probe", tout << expr_ref(e, m) << ": " << sort_ref(e->get_sort(), m) << "\n";);
TRACE(probe, tout << expr_ref(e, m) << ": " << sort_ref(e->get_sort(), m) << "\n";);
throw found();
}
@ -615,13 +615,13 @@ struct is_non_qfufnra_functor {
return;
case OP_IDIV: case OP_DIV: case OP_REM: case OP_MOD:
if (!u.is_numeral(n->get_arg(1))) {
TRACE("arith", tout << "non-linear " << expr_ref(n, m) << "\n";);
TRACE(arith, tout << "non-linear " << expr_ref(n, m) << "\n";);
throw_found();
}
return;
case OP_POWER:
if (!u.is_numeral(n->get_arg(1))) {
TRACE("arith", tout << "non-linear " << expr_ref(n, m) << "\n";);
TRACE(arith, tout << "non-linear " << expr_ref(n, m) << "\n";);
throw_found();
}
m_has_nonlinear = true;
@ -632,7 +632,7 @@ struct is_non_qfufnra_functor {
throw_found();
return;
default:
TRACE("arith", tout << "non-linear " << expr_ref(n, m) << "\n";);
TRACE(arith, tout << "non-linear " << expr_ref(n, m) << "\n";);
throw_found();
}
}

View file

@ -299,7 +299,7 @@ struct purify_arith_proc {
void push_cnstr(expr * cnstr) {
m_new_cnstrs.push_back(cnstr);
TRACE("purify_arith", tout << mk_pp(cnstr, m()) << "\n";);
TRACE(purify_arith, tout << mk_pp(cnstr, m()) << "\n";);
}
void cache_result(app * t, expr * r, proof * pr) {
@ -765,7 +765,7 @@ struct purify_arith_proc {
expr_ref new_body(m());
proof_ref new_body_pr(m());
r(q->get_expr(), new_body, new_body_pr);
TRACE("purify_arith",
TRACE(purify_arith,
tout << "body: " << mk_ismt2_pp(q->get_expr(), m()) << "\nnew_body: " << new_body << "\n";);
result = m().update_quantifier(q, new_body);
if (m_produce_proofs) {
@ -792,8 +792,8 @@ struct purify_arith_proc {
// add constraints
sz = r.cfg().m_new_cnstrs.size();
TRACE("purify_arith", tout << r.cfg().m_new_cnstrs << "\n";);
TRACE("purify_arith", tout << r.cfg().m_new_cnstr_prs << "\n";);
TRACE(purify_arith, tout << r.cfg().m_new_cnstrs << "\n";);
TRACE(purify_arith, tout << r.cfg().m_new_cnstr_prs << "\n";);
for (unsigned i = 0; i < sz; i++) {
m_goal.assert_expr(r.cfg().m_new_cnstrs.get(i), m_produce_proofs ? r.cfg().m_new_cnstr_prs.get(i) : nullptr, nullptr);
}
@ -923,7 +923,7 @@ public:
goal_ref_buffer & result) override {
try {
tactic_report report("purify-arith", *g);
TRACE("goal", g->display(tout););
TRACE(goal, g->display(tout););
bool produce_proofs = g->proofs_enabled();
bool produce_models = g->models_enabled();
bool elim_root_objs = m_params.get_bool("elim_root_objects", true);

View file

@ -300,7 +300,7 @@ class recover_01_tactic : public tactic {
else
x_def = m_util.mk_add(def_args);
TRACE("recover_01", tout << x->get_name() << " --> " << mk_ismt2_pp(x_def, m) << "\n";);
TRACE(recover_01, tout << x->get_name() << " --> " << mk_ismt2_pp(x_def, m) << "\n";);
subst->insert(m.mk_const(x), x_def);
if (m_produce_models) {
gmc->add(x, x_def);
@ -373,7 +373,7 @@ class recover_01_tactic : public tactic {
new_goal->update(idx, new_curr);
}
result.push_back(new_goal.get());
TRACE("recover_01", new_goal->display(tout); if (new_goal->mc()) new_goal->mc()->display(tout););
TRACE(recover_01, new_goal->display(tout); if (new_goal->mc()) new_goal->mc()->display(tout););
SASSERT(new_goal->is_well_formed());
}

View file

@ -66,7 +66,7 @@ struct bit_blaster_model_converter : public model_converter {
bits.insert(to_app(bit)->get_decl());
}
}
TRACE("model_converter",
TRACE(model_converter,
tout << "bits that should not be included in the model:\n";
for (func_decl* f : bits) {
tout << f->get_name() << " ";
@ -81,14 +81,14 @@ struct bit_blaster_model_converter : public model_converter {
func_decl * f = old_model->get_constant(i);
if (bits.contains(f))
continue;
TRACE("model_converter", tout << "non-bit: " << f->get_name() << "\n";);
TRACE(model_converter, tout << "non-bit: " << f->get_name() << "\n";);
expr * fi = old_model->get_const_interp(f);
new_model->register_decl(f, fi);
}
TRACE("model_converter", tout << "after copy non bits:\n"; model_pp(tout, *new_model););
TRACE(model_converter, tout << "after copy non bits:\n"; model_pp(tout, *new_model););
new_model->copy_func_interps(*old_model);
new_model->copy_usort_interps(*old_model);
TRACE("model_converter", tout << "after copying functions and sorts:\n"; model_pp(tout, *new_model););
TRACE(model_converter, tout << "after copying functions and sorts:\n"; model_pp(tout, *new_model););
}
void mk_bvs(model * old_model, model * new_model) {

View file

@ -59,7 +59,7 @@ class bit_blaster_tactic : public tactic {
tactic_report report("bit-blast", *g);
TRACE("before_bit_blaster", g->display(tout););
TRACE(before_bit_blaster, g->display(tout););
m_num_steps = 0;
m_rewriter->start_rewrite();
@ -79,7 +79,7 @@ class bit_blaster_tactic : public tactic {
}
if (curr != new_curr) {
change = true;
TRACE("bit_blaster", tout << mk_pp(curr, m()) << " -> " << new_curr << "\n";);
TRACE(bit_blaster, tout << mk_pp(curr, m()) << " -> " << new_curr << "\n";);
g->update(idx, new_curr, new_pr, g->dep(idx));
}
}
@ -92,7 +92,7 @@ class bit_blaster_tactic : public tactic {
}
g->inc_depth();
result.push_back(g.get());
TRACE("after_bit_blaster", g->display(tout); if (g->mc()) g->mc()->display(tout); tout << "\n";);
TRACE(after_bit_blaster, g->display(tout); if (g->mc()) g->mc()->display(tout); tout << "\n";);
m_rewriter->cleanup();
}

View file

@ -56,7 +56,7 @@ struct bv_bound_chk_rewriter_cfg : public default_rewriter_cfg {
br_status reduce_app(func_decl * f, unsigned num, expr * const * args, expr_ref & result, proof_ref & result_pr) {
const br_status st = reduce_app_core(f, num, args, result, result_pr);
CTRACE("bv_bound_chk_step", st != BR_FAILED,
CTRACE(bv_bound_chk_step, st != BR_FAILED,
tout << f->get_name() << "\n";
for (unsigned i = 0; i < num; i++) tout << mk_ismt2_pp(args[i], m()) << "\n";
tout << "---------->\n" << mk_ismt2_pp(result, m()) << "\n";);

View file

@ -145,7 +145,7 @@ public:
if (m_util.is_bv_sle(f, lhs, rhs)) {
bv_sz = m_util.get_bv_size(lhs);
if (is_uninterp_const(lhs) && m_util.is_numeral(rhs, val, bv_sz)) {
TRACE("bv_size_reduction", tout << (negated?"not ":"") << mk_ismt2_pp(f, m) << std::endl; );
TRACE(bv_size_reduction, tout << (negated?"not ":"") << mk_ismt2_pp(f, m) << std::endl; );
// v <= k
val = m_util.norm(val, bv_sz, true);
if (negated) {
@ -160,7 +160,7 @@ public:
else update_signed_upper(to_app(lhs), val);
}
else if (is_uninterp_const(rhs) && m_util.is_numeral(lhs, val, bv_sz)) {
TRACE("bv_size_reduction", tout << (negated?"not ":"") << mk_ismt2_pp(f, m) << std::endl; );
TRACE(bv_size_reduction, tout << (negated?"not ":"") << mk_ismt2_pp(f, m) << std::endl; );
// k <= v
val = m_util.norm(val, bv_sz, true);
if (negated) {
@ -178,7 +178,7 @@ public:
#if 0
else if (m_util.is_bv_ule(f, lhs, rhs)) {
if (is_uninterp_const(lhs) && m_util.is_numeral(rhs, val, bv_sz)) {
TRACE("bv_size_reduction", tout << (negated?"not ":"") << mk_ismt2_pp(f, m) << std::endl; );
TRACE(bv_size_reduction, tout << (negated?"not ":"") << mk_ismt2_pp(f, m) << std::endl; );
// v <= k
if (negated)
update_unsigned_lower(to_app(lhs), val+numeral(1));
@ -186,7 +186,7 @@ public:
update_unsigned_upper(to_app(lhs), val);
}
else if (is_uninterp_const(rhs) && m_util.is_numeral(lhs, val, bv_sz)) {
TRACE("bv_size_reduction", tout << (negated?"not ":"") << mk_ismt2_pp(f, m) << std::endl; );
TRACE(bv_size_reduction, tout << (negated?"not ":"") << mk_ismt2_pp(f, m) << std::endl; );
// k <= v
if (negated)
update_unsigned_upper(to_app(rhs), val-numeral(1));
@ -212,7 +212,7 @@ public:
void run(goal & g, model_converter_ref & mc) {
if (g.inconsistent())
return;
TRACE("before_bv_size_reduction", g.display(tout););
TRACE(before_bv_size_reduction, g.display(tout););
m_produce_models = g.models_enabled();
mc = nullptr;
m_mc = nullptr;
@ -243,7 +243,7 @@ public:
if (!(m_signed_lowers.empty() || m_signed_uppers.empty())) {
TRACE("bv_size_reduction",
TRACE(bv_size_reduction,
tout << "m_signed_lowers: " << std::endl;
for (auto const& [k, v] : m_signed_lowers)
tout << mk_ismt2_pp(k, m) << " >= " << v.to_string() << std::endl;
@ -258,7 +258,7 @@ public:
obj_map<app, numeral>::obj_map_entry * entry = m_signed_uppers.find_core(k);
if (entry != nullptr) {
numeral u = m_util.norm(entry->get_data().m_value, bv_sz, true);
TRACE("bv_size_reduction", tout << l << " <= " << k->get_decl()->get_name() << " <= " << u << "\n";);
TRACE(bv_size_reduction, tout << l << " <= " << k->get_decl()->get_name() << " <= " << u << "\n";);
expr * new_def = nullptr;
app * new_const = nullptr;
if (l > u) {
@ -278,7 +278,7 @@ public:
{
// l <= v <= u <= 0
unsigned i_nb = l_nb;
TRACE("bv_size_reduction", tout << " l <= " << k->get_decl()->get_name() << " <= u <= 0 " << " --> " << i_nb << " bits\n";);
TRACE(bv_size_reduction, tout << " l <= " << k->get_decl()->get_name() << " <= u <= 0 " << " --> " << i_nb << " bits\n";);
if (i_nb < v_nb) {
new_const = m.mk_fresh_const(nullptr, m_util.mk_sort(i_nb));
new_def = m_util.mk_concat(m_util.mk_numeral(numeral(-1), v_nb - i_nb), new_const);
@ -288,7 +288,7 @@ public:
// l <= v <= 0 <= u
unsigned u_nb = u.get_num_bits();
unsigned i_nb = ((l_nb > u_nb) ? l_nb : u_nb) + 1;
TRACE("bv_size_reduction", tout << " l <= " << k->get_decl()->get_name() << " <= 0 <= u " << " --> " << i_nb << " bits\n";);
TRACE(bv_size_reduction, tout << " l <= " << k->get_decl()->get_name() << " <= 0 <= u " << " --> " << i_nb << " bits\n";);
if (i_nb < v_nb) {
new_const = m.mk_fresh_const(nullptr, m_util.mk_sort(i_nb));
new_def = m_util.mk_sign_extend(v_nb - i_nb, new_const);
@ -299,7 +299,7 @@ public:
// 0 <= l <= v <= u
unsigned u_nb = u.get_num_bits();
unsigned v_nb = m_util.get_bv_size(k);
TRACE("bv_size_reduction", tout << l << " <= " << k->get_decl()->get_name() << " <= " << u << " --> " << u_nb << " bits\n";);
TRACE(bv_size_reduction, tout << l << " <= " << k->get_decl()->get_name() << " <= " << u << " --> " << u_nb << " bits\n";);
if (u_nb < v_nb) {
new_const = m.mk_fresh_const(nullptr, m_util.mk_sort(u_nb));
new_def = m_util.mk_concat(m_util.mk_numeral(numeral(0), v_nb - u_nb), new_const);
@ -325,7 +325,7 @@ public:
#if 0
if (!(m_unsigned_lowers.empty() && m_unsigned_uppers.empty())) {
TRACE("bv_size_reduction",
TRACE(bv_size_reduction,
tout << "m_unsigned_lowers: " << std::endl;
for (obj_map<app, numeral>::iterator it = m_unsigned_lowers.begin(); it != m_unsigned_lowers.end(); it++)
tout << mk_ismt2_pp(it->m_key, m) << " >= " << it->m_value.to_string() << std::endl;
@ -352,7 +352,7 @@ public:
if (lse != 0 && lse->get_data().m_value > l) l = lse->get_data().m_value;
if (use != 0 && use->get_data().m_value < u) u = use->get_data().m_value;
TRACE("bv_size_reduction", tout << l << " <= " << v->get_decl()->get_name() << " <= " << u << "\n";);
TRACE(bv_size_reduction, tout << l << " <= " << v->get_decl()->get_name() << " <= " << u << "\n";);
expr * new_def = 0;
app * new_const = 0;
if (l > u) {
@ -384,7 +384,7 @@ public:
m_fmc->hide(new_const);
}
num_reduced++;
TRACE("bv_size_reduction", tout << "New definition = " << mk_ismt2_pp(new_def, m) << "\n";);
TRACE(bv_size_reduction, tout << "New definition = " << mk_ismt2_pp(new_def, m) << "\n";);
}
}
}
@ -413,7 +413,7 @@ public:
m_fmc = nullptr;
}
report_tactic_progress(":bv-reduced", num_reduced);
TRACE("after_bv_size_reduction", g.display(tout); if (m_mc) m_mc->display(tout););
TRACE(after_bv_size_reduction, g.display(tout); if (m_mc) m_mc->display(tout););
}
};
@ -422,7 +422,7 @@ void bv_size_reduction_tactic::operator()(goal_ref const & g,
goal_ref_buffer & result) {
fail_if_proof_generation("bv-size-reduction", g);
fail_if_unsat_core_generation("bv-size-reduction", g);
TRACE("goal", g->display(tout););
TRACE(goal, g->display(tout););
result.reset();
model_converter_ref mc;
run(*(g.get()), mc);

View file

@ -111,7 +111,7 @@ func_decl_ref bvarray2uf_rewriter_cfg::mk_uf_for_array(expr * e) {
sort * domain = get_index_sort(e);
sort * range = get_value_sort(e);
bv_f = m_manager.mk_fresh_func_decl("f_t", "", 1, &domain, range);
TRACE("bvarray2uf_rw", tout << "for " << mk_ismt2_pp(e, m_manager) << " new func_decl is " << mk_ismt2_pp(bv_f, m_manager) << std::endl; );
TRACE(bvarray2uf_rw, tout << "for " << mk_ismt2_pp(e, m_manager) << " new func_decl is " << mk_ismt2_pp(bv_f, m_manager) << std::endl; );
if (m_fmc) {
m_fmc->hide(bv_f);
if (is_uninterp_const(e))
@ -122,7 +122,7 @@ func_decl_ref bvarray2uf_rewriter_cfg::mk_uf_for_array(expr * e) {
m_manager.inc_ref(bv_f);
}
else {
TRACE("bvarray2uf_rw", tout << "for " << mk_ismt2_pp(e, m_manager) << " found " << mk_ismt2_pp(bv_f, m_manager) << std::endl; );
TRACE(bvarray2uf_rw, tout << "for " << mk_ismt2_pp(e, m_manager) << " found " << mk_ismt2_pp(bv_f, m_manager) << std::endl; );
}
return func_decl_ref(bv_f, m_manager);
@ -164,7 +164,7 @@ br_status bvarray2uf_rewriter_cfg::reduce_app(func_decl * f, unsigned num, expr
func_decl_ref f_t(mk_uf_for_array(args[1]), m_manager);
func_decl_ref f_f(mk_uf_for_array(args[2]), m_manager);
TRACE("bvarray2uf_rw", tout << "(ite " << c << ", " << f_t->get_name()
TRACE(bvarray2uf_rw, tout << "(ite " << c << ", " << f_t->get_name()
<< ", " << f_f->get_name() << ")" << std::endl;);
sort * sorts[1] = { get_index_sort(args[1]->get_sort()) };
@ -189,7 +189,7 @@ br_status bvarray2uf_rewriter_cfg::reduce_app(func_decl * f, unsigned num, expr
result = m_array_util.mk_as_array(bv_f);
TRACE("bvarray2uf_rw", tout << "result: " << mk_ismt2_pp(result, m_manager) << ")" << std::endl;);
TRACE(bvarray2uf_rw, tout << "result: " << mk_ismt2_pp(result, m_manager) << ")" << std::endl;);
res = BR_DONE;
}
@ -197,7 +197,7 @@ br_status bvarray2uf_rewriter_cfg::reduce_app(func_decl * f, unsigned num, expr
throw default_exception("not handled by bvarray2uf");
}
else if (f->get_family_id() == null_family_id) {
TRACE("bvarray2uf_rw", tout << "UF APP: " << f->get_name() << std::endl; );
TRACE(bvarray2uf_rw, tout << "UF APP: " << f->get_name() << std::endl; );
bool has_bv_arrays = false;
func_decl_ref f_t(m_manager);
@ -225,13 +225,13 @@ br_status bvarray2uf_rewriter_cfg::reduce_app(func_decl * f, unsigned num, expr
res = BR_FAILED;
}
else if (m_array_util.get_family_id() == f->get_family_id()) {
TRACE("bvarray2uf_rw", tout << "APP: " << f->get_name() << std::endl; );
TRACE(bvarray2uf_rw, tout << "APP: " << f->get_name() << std::endl; );
if (m_array_util.is_select(f)) {
SASSERT(num == 2);
expr * t = args[0];
expr * i = args[1];
TRACE("bvarray2uf_rw", tout <<
TRACE(bvarray2uf_rw, tout <<
"select; array: " << mk_ismt2_pp(t, m()) <<
" index: " << mk_ismt2_pp(i, m()) << std::endl;);
@ -309,7 +309,7 @@ br_status bvarray2uf_rewriter_cfg::reduce_app(func_decl * f, unsigned num, expr
expr * s = args[0];
expr * i = args[1];
expr * v = args[2];
TRACE("bvarray2uf_rw", tout <<
TRACE(bvarray2uf_rw, tout <<
"store; array: " << mk_ismt2_pp(s, m()) <<
" index: " << mk_ismt2_pp(i, m()) <<
" value: " << mk_ismt2_pp(v, m()) << std::endl;);
@ -340,7 +340,7 @@ br_status bvarray2uf_rewriter_cfg::reduce_app(func_decl * f, unsigned num, expr
expr_ref ground_atom(m_manager);
ground_atom = m_manager.mk_eq(m_manager.mk_app(f_t, i), v);
extra_assertions.push_back(ground_atom);
TRACE("bvarray2uf_rw", tout << "ground atom: " << mk_ismt2_pp(ground_atom, m()) << std::endl; );
TRACE(bvarray2uf_rw, tout << "ground atom: " << mk_ismt2_pp(ground_atom, m()) << std::endl; );
}
}
else {
@ -350,17 +350,17 @@ br_status bvarray2uf_rewriter_cfg::reduce_app(func_decl * f, unsigned num, expr
}
}
CTRACE("bvarray2uf_rw", res == BR_DONE, tout << "result: " << mk_ismt2_pp(result, m()) << std::endl; );
CTRACE(bvarray2uf_rw, res == BR_DONE, tout << "result: " << mk_ismt2_pp(result, m()) << std::endl; );
return res;
}
bool bvarray2uf_rewriter_cfg::pre_visit(expr * t)
{
TRACE("bvarray2uf_rw_q", tout << "pre_visit: " << mk_ismt2_pp(t, m()) << std::endl;);
TRACE(bvarray2uf_rw_q, tout << "pre_visit: " << mk_ismt2_pp(t, m()) << std::endl;);
if (is_quantifier(t)) {
quantifier * q = to_quantifier(t);
TRACE("bvarray2uf_rw_q", tout << "pre_visit quantifier [" << q->get_id() << "]: " << mk_ismt2_pp(q->get_expr(), m()) << std::endl;);
TRACE(bvarray2uf_rw_q, tout << "pre_visit quantifier [" << q->get_id() << "]: " << mk_ismt2_pp(q->get_expr(), m()) << std::endl;);
sort_ref_vector new_bindings(m_manager);
for (unsigned i = 0; i < q->get_num_decls(); i++)
new_bindings.push_back(q->get_decl_sort(i));

View file

@ -69,7 +69,7 @@ class elim_small_bv_tactic : public tactic {
expr_ref replace_var(used_vars & uv,
unsigned num_decls, unsigned max_var_idx_p1,
unsigned idx, sort * s, expr * e, expr * replacement) {
TRACE("elim_small_bv", tout << "replace idx " << idx << " with " << mk_ismt2_pp(replacement, m) <<
TRACE(elim_small_bv, tout << "replace idx " << idx << " with " << mk_ismt2_pp(replacement, m) <<
" in " << mk_ismt2_pp(e, m) << std::endl;);
expr_ref res(m);
ptr_vector<expr> substitution;
@ -88,7 +88,7 @@ class elim_small_bv_tactic : public tactic {
// (VAR 0) should be in the last position of substitution.
TRACE("elim_small_bv", tout << "substitution: " << std::endl;
TRACE(elim_small_bv, tout << "substitution: " << std::endl;
for (unsigned k = 0; k < substitution.size(); k++) {
expr * se = substitution[k];
tout << k << " = ";
@ -103,13 +103,13 @@ class elim_small_bv_tactic : public tactic {
proof_ref pr(m);
m_simp(res, res, pr);
TRACE("elim_small_bv", tout << "replace done: " << mk_ismt2_pp(res, m) << std::endl;);
TRACE(elim_small_bv, tout << "replace done: " << mk_ismt2_pp(res, m) << std::endl;);
return res;
}
br_status reduce_app(func_decl * f, unsigned num, expr * const * args, expr_ref & result, proof_ref & result_pr) {
TRACE("elim_small_bv_app", expr_ref tmp(m.mk_app(f, num, args), m); tout << "reduce " << tmp << std::endl; );
TRACE(elim_small_bv_app, expr_ref tmp(m.mk_app(f, num, args), m); tout << "reduce " << tmp << std::endl; );
return BR_FAILED;
}
@ -123,7 +123,7 @@ class elim_small_bv_tactic : public tactic {
if (is_lambda(q)) {
return false;
}
TRACE("elim_small_bv", tout << "reduce_quantifier " << mk_ismt2_pp(q, m) << std::endl; );
TRACE(elim_small_bv, tout << "reduce_quantifier " << mk_ismt2_pp(q, m) << std::endl; );
unsigned long long num_steps = 0;
unsigned curr_sz = m_bindings.size();
SASSERT(q->get_num_decls() <= curr_sz);
@ -141,7 +141,7 @@ class elim_small_bv_tactic : public tactic {
expr_ref_vector new_bodies(m);
if (is_small_bv(s) && !max_steps_exceeded(num_steps)) {
unsigned bv_sz = m_util.get_bv_size(s);
TRACE("elim_small_bv", tout << "eliminating " << q->get_decl_name(i) <<
TRACE(elim_small_bv, tout << "eliminating " << q->get_decl_name(i) <<
"; sort = " << mk_ismt2_pp(s, m) <<
"; body = " << mk_ismt2_pp(body, m) << std::endl;);
@ -169,7 +169,7 @@ class elim_small_bv_tactic : public tactic {
return false;
}
TRACE("elim_small_bv", tout << "new bodies: " << std::endl;
TRACE(elim_small_bv, tout << "new bodies: " << std::endl;
for (unsigned k = 0; k < new_bodies.size(); k++)
tout << mk_ismt2_pp(new_bodies[k].get(), m) << std::endl; );
@ -187,7 +187,7 @@ class elim_small_bv_tactic : public tactic {
unused_vars_eliminator el(m, m_params);
result = el(new_q);
TRACE("elim_small_bv", tout << "elimination result: " << mk_ismt2_pp(result, m) << std::endl; );
TRACE(elim_small_bv, tout << "elimination result: " << mk_ismt2_pp(result, m) << std::endl; );
result_pr = nullptr; // proofs NIY
m_bindings.shrink(old_sz);
@ -195,10 +195,10 @@ class elim_small_bv_tactic : public tactic {
}
bool pre_visit(expr * t) {
TRACE("elim_small_bv_pre", tout << "pre_visit: " << mk_ismt2_pp(t, m) << std::endl;);
TRACE(elim_small_bv_pre, tout << "pre_visit: " << mk_ismt2_pp(t, m) << std::endl;);
if (is_quantifier(t)) {
quantifier * q = to_quantifier(t);
TRACE("elim_small_bv", tout << "pre_visit quantifier [" << q->get_id() << "]: " << mk_ismt2_pp(q->get_expr(), m) << std::endl;);
TRACE(elim_small_bv, tout << "pre_visit quantifier [" << q->get_id() << "]: " << mk_ismt2_pp(q->get_expr(), m) << std::endl;);
sort_ref_vector new_bindings(m);
for (unsigned i = 0; i < q->get_num_decls(); i++)
new_bindings.push_back(q->get_decl_sort(i));

View file

@ -74,7 +74,7 @@ class blast_term_ite_tactic : public tactic {
for (unsigned i = 0; i < num_args; ++i) {
expr* c, *t, *e;
if (!m.is_bool(args[i]) && m.is_ite(args[i], c, t, e)) {
TRACE("blast_term_ite", result = m.mk_app(f, num_args, args); tout << result << "\n";);
TRACE(blast_term_ite, result = m.mk_app(f, num_args, args); tout << result << "\n";);
expr_ref e1(m), e2(m);
ptr_vector<expr> args1(num_args, args);
args1[i] = t;

View file

@ -107,7 +107,7 @@ struct cofactor_elim_term_ite::imp {
frame & fr = m_frame_stack.back();
expr * t = fr.m_t;
bool form_ctx = fr.m_form_ctx;
TRACE("cofactor", tout << "processing, form_ctx: " << form_ctx << "\n" << mk_bounded_pp(t, m) << "\n";);
TRACE(cofactor, tout << "processing, form_ctx: " << form_ctx << "\n" << mk_bounded_pp(t, m) << "\n";);
m_owner.checkpoint();
@ -140,7 +140,7 @@ struct cofactor_elim_term_ite::imp {
for (expr* arg : *to_app(t)) {
if (m_has_term_ite.is_marked(arg)) {
m_has_term_ite.mark(t);
TRACE("cofactor", tout << "saving candidate: " << form_ctx << "\n" << mk_bounded_pp(t, m) << "\n";);
TRACE(cofactor, tout << "saving candidate: " << form_ctx << "\n" << mk_bounded_pp(t, m) << "\n";);
save_candidate(t, form_ctx);
break;
}
@ -159,7 +159,7 @@ struct cofactor_elim_term_ite::imp {
};
expr * get_first(expr * t) {
TRACE("cofactor", tout << mk_ismt2_pp(t, m) << "\n";);
TRACE(cofactor, tout << mk_ismt2_pp(t, m) << "\n";);
typedef std::pair<expr *, unsigned> frame;
expr_fast_mark1 visited;
sbuffer<frame> stack;
@ -218,7 +218,7 @@ struct cofactor_elim_term_ite::imp {
\brief Fuctor for selecting the term if-then-else condition with the most number of occurrences.
*/
expr * get_best(expr * t) {
TRACE("cofactor", tout << mk_ismt2_pp(t, m) << "\n";);
TRACE(cofactor, tout << mk_ismt2_pp(t, m) << "\n";);
typedef std::pair<expr *, unsigned> frame;
obj_map<expr, unsigned> occs;
expr_fast_mark1 visited;
@ -291,7 +291,7 @@ struct cofactor_elim_term_ite::imp {
}
}
visited.reset();
CTRACE("cofactor", best != 0, tout << "best num-occs: " << best_occs << "\n" << mk_ismt2_pp(best, m) << "\n";);
CTRACE(cofactor, best != 0, tout << "best num-occs: " << best_occs << "\n" << mk_ismt2_pp(best, m) << "\n";);
return best;
}
@ -352,12 +352,12 @@ struct cofactor_elim_term_ite::imp {
if (m.is_unique_value(lhs)) {
m_term = rhs;
m_value = to_app(lhs);
TRACE("cofactor", tout << "term:\n" << mk_ismt2_pp(m_term, m) << "\nvalue: " << mk_ismt2_pp(m_value, m) << "\n";);
TRACE(cofactor, tout << "term:\n" << mk_ismt2_pp(m_term, m) << "\nvalue: " << mk_ismt2_pp(m_value, m) << "\n";);
}
else if (m.is_unique_value(rhs)) {
m_term = lhs;
m_value = to_app(rhs);
TRACE("cofactor", tout << "term:\n" << mk_ismt2_pp(m_term, m) << "\nvalue: " << mk_ismt2_pp(m_value, m) << "\n";);
TRACE(cofactor, tout << "term:\n" << mk_ismt2_pp(m_term, m) << "\nvalue: " << mk_ismt2_pp(m_value, m) << "\n";);
}
}
// TODO: bounds
@ -438,7 +438,7 @@ struct cofactor_elim_term_ite::imp {
if (m_cache.find(s, t))
return true;
TRACE("cofactor_ite", tout << "cofactor target:\n" << mk_ismt2_pp(s, m) << "\n";);
TRACE(cofactor_ite, tout << "cofactor target:\n" << mk_ismt2_pp(s, m) << "\n";);
expr_ref curr(m);
curr = s;
while (true) {
@ -459,7 +459,7 @@ struct cofactor_elim_term_ite::imp {
m_cofactor.set_cofactor_atom(neg_c);
m_cofactor(curr, neg_cofactor);
curr = m.mk_ite(c, pos_cofactor, neg_cofactor);
TRACE("cofactor", tout << "cofactor_ite step\n" << mk_ismt2_pp(curr, m) << "\n";);
TRACE(cofactor, tout << "cofactor_ite step\n" << mk_ismt2_pp(curr, m) << "\n";);
}
}
return false;
@ -513,7 +513,7 @@ struct cofactor_elim_term_ite::imp {
}
void cofactor(expr * t, expr_ref & r) {
TRACE("cofactor", tout << "cofactor target:\n" << mk_ismt2_pp(t, m) << "\n";);
TRACE(cofactor, tout << "cofactor target:\n" << mk_ismt2_pp(t, m) << "\n";);
expr_ref curr(m);
curr = t;
while (true) {
@ -543,7 +543,7 @@ struct cofactor_elim_term_ite::imp {
else {
curr = m.mk_ite(c, pos_cofactor, neg_cofactor);
}
TRACE("cofactor",
TRACE(cofactor,
tout << "cofactor_ite step\n";
tout << "cofactor: " << mk_ismt2_pp(c, m) << "\n";
tout << mk_ismt2_pp(curr, m) << "\n";);
@ -565,7 +565,7 @@ struct cofactor_elim_term_ite::imp {
m_owner.checkpoint();
frame & fr = m_frames.back();
expr * t = fr.first;
TRACE("cofactor_bug", tout << "processing: " << t->get_id() << " :first " << fr.second << "\n";);
TRACE(cofactor_bug, tout << "processing: " << t->get_id() << " :first " << fr.second << "\n";);
if (!is_app(t)) {
m_cache.insert(t, t);
m_frames.pop_back();
@ -594,7 +594,7 @@ struct cofactor_elim_term_ite::imp {
for (unsigned i = 0; i < num; i++) {
expr * arg = to_app(t)->get_arg(i);
expr * new_arg = nullptr;
TRACE("cofactor_bug", tout << "collecting child: " << arg->get_id() << "\n";);
TRACE(cofactor_bug, tout << "collecting child: " << arg->get_id() << "\n";);
m_cache.find(arg, new_arg);
SASSERT(new_arg != 0);
if (new_arg != arg)
@ -622,7 +622,7 @@ struct cofactor_elim_term_ite::imp {
if (has_term_ite)
m_has_term_ite.insert(new_t);
SASSERT(new_t.get() != 0);
TRACE("cofactor_bug", tout << "caching: " << t->get_id() << "\n";);
TRACE(cofactor_bug, tout << "caching: " << t->get_id() << "\n";);
#if 0
counter ++;
verbose_stream() << counter << "\n";

View file

@ -82,7 +82,7 @@ void ctx_propagate_assertions::assert_eq_core(expr * t, app * val) {
return;
}
CTRACE("assert_eq_bug", m_assertions.contains(t),
CTRACE(assert_eq_bug, m_assertions.contains(t),
tout << "t:\n" << mk_ismt2_pp(t, m) << "\nval:\n" << mk_ismt2_pp(val, m) << "\n";
expr * old_val = 0;
m_assertions.find(t, old_val);
@ -180,7 +180,7 @@ struct ctx_simplify_tactic::imp {
dealloc(m_simp);
DEBUG_CODE({
for (unsigned i = 0; i < m_cache.size(); i++) {
CTRACE("ctx_simplify_tactic_bug", m_cache[i].m_from,
CTRACE(ctx_simplify_tactic_bug, m_cache[i].m_from,
tout << "i: " << i << "\n" << mk_ismt2_pp(m_cache[i].m_from, m) << "\n";
tout << "m_result: " << m_cache[i].m_result << "\n";
if (m_cache[i].m_result) tout << "lvl: " << m_cache[i].m_result->m_lvl << "\n";);
@ -205,7 +205,7 @@ struct ctx_simplify_tactic::imp {
}
bool shared(expr * t) const {
TRACE("ctx_simplify_tactic_bug", tout << mk_pp(t, m) << "\n";);
TRACE(ctx_simplify_tactic_bug, tout << mk_pp(t, m) << "\n";);
return t->get_ref_count() > 1 && m_occs.get_num_occs(t) > 1;
}
@ -226,7 +226,7 @@ struct ctx_simplify_tactic::imp {
void cache_core(expr * from, expr * to) {
unsigned id = from->get_id();
TRACE("ctx_simplify_tactic_cache", tout << "caching " << id << " @ " << scope_level() << "\n" << mk_ismt2_pp(from, m) << "\n--->\n" << mk_ismt2_pp(to, m) << "\n";);
TRACE(ctx_simplify_tactic_cache, tout << "caching " << id << " @ " << scope_level() << "\n" << mk_ismt2_pp(from, m) << "\n--->\n" << mk_ismt2_pp(to, m) << "\n";);
m_cache.reserve(id+1);
cache_cell & cell = m_cache[id];
void * mem = m_allocator.allocate(sizeof(cached_result));
@ -271,7 +271,7 @@ struct ctx_simplify_tactic::imp {
m.dec_ref(cell.m_result->m_to);
cached_result * to_delete = cell.m_result;
SASSERT(to_delete->m_lvl == lvl);
TRACE("ctx_simplify_tactic_cache", tout << "uncaching: " << to_delete->m_lvl << "\n" <<
TRACE(ctx_simplify_tactic_cache, tout << "uncaching: " << to_delete->m_lvl << "\n" <<
mk_ismt2_pp(key, m) << "\n--->\n" << mk_ismt2_pp(to_delete->m_to, m) << "\nrestoring:\n";
if (to_delete->m_next) tout << mk_ismt2_pp(to_delete->m_next->m_to, m); else tout << "<null>";
tout << "\n";);
@ -327,7 +327,7 @@ struct ctx_simplify_tactic::imp {
return;
}
checkpoint();
TRACE("ctx_simplify_tactic_detail", tout << "processing: " << mk_bounded_pp(t, m) << "\n";);
TRACE(ctx_simplify_tactic_detail, tout << "processing: " << mk_bounded_pp(t, m) << "\n";);
if (is_cached(t, r) || m_simp->simplify(t, r)) {
SASSERT(r.get() != 0);
return;
@ -344,7 +344,7 @@ struct ctx_simplify_tactic::imp {
simplify_app(to_app(t), r);
m_depth--;
SASSERT(r.get() != 0);
TRACE("ctx_simplify_tactic_detail", tout << "result:\n" << mk_bounded_pp(t, m) << "\n---->\n" << mk_bounded_pp(r, m) << "\n";);
TRACE(ctx_simplify_tactic_detail, tout << "result:\n" << mk_bounded_pp(t, m) << "\n---->\n" << mk_bounded_pp(r, m) << "\n";);
}
template<bool OR>
@ -462,7 +462,7 @@ struct ctx_simplify_tactic::imp {
}
else {
expr * args[3] = { new_c.get(), new_t.get(), new_e.get() };
TRACE("ctx_simplify_tactic_ite_bug",
TRACE(ctx_simplify_tactic_ite_bug,
tout << "mk_ite\n" << mk_ismt2_pp(new_c.get(), m) << "\n" << mk_ismt2_pp(new_t.get(), m)
<< "\n" << mk_ismt2_pp(new_e.get(), m) << "\n";);
m_mk_app(ite->get_decl(), 3, args, r);
@ -483,7 +483,7 @@ struct ctx_simplify_tactic::imp {
expr * arg = t->get_arg(i);
expr_ref new_arg(m);
simplify(arg, new_arg);
CTRACE("ctx_simplify_tactic_bug", new_arg.get() == 0, tout << mk_ismt2_pp(arg, m) << "\n";);
CTRACE(ctx_simplify_tactic_bug, new_arg.get() == 0, tout << mk_ismt2_pp(arg, m) << "\n";);
SASSERT(new_arg);
if (new_arg != arg)
modified = true;
@ -551,14 +551,14 @@ struct ctx_simplify_tactic::imp {
}
void process(expr * s, expr_ref & r) {
TRACE("ctx_simplify_tactic", tout << "simplifying:\n" << mk_ismt2_pp(s, m) << "\n";);
TRACE(ctx_simplify_tactic, tout << "simplifying:\n" << mk_ismt2_pp(s, m) << "\n";);
SASSERT(scope_level() == 0);
m_depth = 0;
simplify(s, r);
SASSERT(scope_level() == 0);
SASSERT(m_depth == 0);
SASSERT(r.get() != 0);
TRACE("ctx_simplify_tactic", tout << "result\n" << mk_ismt2_pp(r, m) << " :num-steps " << m_num_steps << "\n";
TRACE(ctx_simplify_tactic, tout << "result\n" << mk_ismt2_pp(r, m) << " :num-steps " << m_num_steps << "\n";
tout << "old size: " << expr_size(s) << " new size: " << expr_size(r) << "\n";);
if (m_bail_on_blowup && expr_size(s) < expr_size(r)) {
r = s;

View file

@ -99,8 +99,8 @@ class elim_uncnstr_tactic : public tactic {
}
v = m().mk_fresh_const(nullptr, t->get_sort());
TRACE("elim_uncnstr_bug", tout << "eliminating:\n" << mk_ismt2_pp(t, m()) << "\n";);
TRACE("elim_uncnstr_bug_ll", tout << "eliminating:\n" << mk_bounded_pp(t, m()) << "\n";);
TRACE(elim_uncnstr_bug, tout << "eliminating:\n" << mk_ismt2_pp(t, m()) << "\n";);
TRACE(elim_uncnstr_bug_ll, tout << "eliminating:\n" << mk_bounded_pp(t, m()) << "\n";);
m_fresh_vars.push_back(v);
if (m_mc) m_mc->hide(v);
m_cache_domain.push_back(t);
@ -908,7 +908,7 @@ class elim_uncnstr_tactic : public tactic {
void run(goal_ref const & g, goal_ref_buffer & result) {
bool produce_proofs = g->proofs_enabled();
TRACE("goal", g->display(tout););
TRACE(goal, g->display(tout););
statistics_report sreport([&](statistics& st) { collect_statistics(st); });
tactic_report report("elim-uncnstr", *g);
m_vars.reset();
@ -920,7 +920,7 @@ class elim_uncnstr_tactic : public tactic {
return;
}
bool modified = true;
TRACE("elim_uncnstr", tout << "unconstrained variables...\n";
TRACE(elim_uncnstr, tout << "unconstrained variables...\n";
for (expr * v : m_vars) tout << mk_ismt2_pp(v, m()) << " ";
tout << "\n";);
init_mc(g->models_enabled());
@ -951,12 +951,12 @@ class elim_uncnstr_tactic : public tactic {
m_num_elim_apps = m_rw->cfg().m_fresh_vars.size();
g->add(m_mc.get());
}
TRACE("elim_uncnstr", if (m_mc) m_mc->display(tout); else tout << "no mc\n";);
TRACE(elim_uncnstr, if (m_mc) m_mc->display(tout); else tout << "no mc\n";);
m_mc = nullptr;
m_rw = nullptr;
result.push_back(g.get());
g->inc_depth();
TRACE("goal", g->display(tout););
TRACE(goal, g->display(tout););
return;
}
modified = false;

View file

@ -144,7 +144,7 @@ class injectivity_tactic : public tactic {
for (unsigned i = 0; i < goal->size(); ++i) {
func_decl *f, *g;
if (!is_axiom(goal->form(i), f, g)) continue;
TRACE("injectivity", tout << "Marking " << f->get_name() << " as injective" << std::endl;);
TRACE(injectivity, tout << "Marking " << f->get_name() << " as injective" << std::endl;);
inj_map.insert(f, g);
// TODO: Record that g is f's pseudoinverse
}
@ -194,7 +194,7 @@ class injectivity_tactic : public tactic {
return BR_FAILED;
SASSERT(a->get_arg(0)->get_sort() == b->get_arg(0)->get_sort());
TRACE("injectivity", tout << "Rewriting (= " << mk_ismt2_pp(args[0], m()) <<
TRACE(injectivity, tout << "Rewriting (= " << mk_ismt2_pp(args[0], m()) <<
" " << mk_ismt2_pp(args[1], m()) << ")" << std::endl;);
result = m().mk_eq(a->get_arg(0), b->get_arg(0));
result_pr = nullptr;
@ -223,7 +223,7 @@ public:
injectivity_tactic(ast_manager & m, params_ref const & p):
m_params(p),
m_manager(m) {
TRACE("injectivity", tout << "constructed new tactic" << std::endl;);
TRACE(injectivity, tout << "constructed new tactic" << std::endl;);
m_map = alloc(InjHelper, m);
m_finder = alloc(finder, m, *m_map, p);
m_eq = alloc(rewriter_eq, m, *m_map, p);

View file

@ -40,7 +40,7 @@ public:
nnf_tactic(params_ref const & p):
m_params(p),
m_nnf(nullptr) {
TRACE("nnf", tout << "nnf_tactic constructor: " << p << "\n";);
TRACE(nnf, tout << "nnf_tactic constructor: " << p << "\n";);
}
tactic * translate(ast_manager & m) override {
@ -54,7 +54,7 @@ public:
void collect_param_descrs(param_descrs & r) override { nnf::get_param_descrs(r); }
void operator()(goal_ref const & g, goal_ref_buffer & result) override {
TRACE("nnf", tout << "params: " << m_params << "\n"; g->display(tout););
TRACE(nnf, tout << "params: " << m_params << "\n"; g->display(tout););
tactic_report report("nnf", *g);
bool produce_proofs = g->proofs_enabled();
@ -108,6 +108,6 @@ tactic * mk_snf_tactic(ast_manager & m, params_ref const & p) {
tactic * mk_nnf_tactic(ast_manager & m, params_ref const & p) {
params_ref new_p(p);
new_p.set_sym("mode", symbol("full"));
TRACE("nnf", tout << "mk_nnf: " << new_p << "\n";);
TRACE(nnf, tout << "mk_nnf: " << new_p << "\n";);
return using_params(mk_snf_tactic(m, p), new_p);
}

View file

@ -139,7 +139,7 @@ public:
while (it != m_vars.end()) {
app * e = it->m_key;
rec const& r = it->m_value;
TRACE("pb", tout << mk_pp(e, m) << " " << r.pos.size() << " " << r.neg.size() << "\n";);
TRACE(pb, tout << mk_pp(e, m) << " " << r.pos.size() << " " << r.neg.size() << "\n";);
if (r.pos.empty()) {
replace(r.neg, e, m.mk_false(), g);
set_value(mc, e, false);
@ -280,11 +280,11 @@ private:
fml1 = decompose_cut(a, start, end, cut_args, cut_coeffs);
g->assert_expr(fml1, nullptr, g->dep(i));
start = end;
TRACE("pb", tout << fml1 << "\n";);
TRACE(pb, tout << fml1 << "\n";);
}
fml2 = pb.mk_ge(cut_args.size(), cut_coeffs.data(), cut_args.data(), pb.get_k(e));
g->update(i, fml2, nullptr, g->dep(i));
TRACE("pb", tout << fml2 << "\n";);
TRACE(pb, tout << fml2 << "\n";);
}
}
}
@ -465,7 +465,7 @@ private:
expr_ref tmp1(m), tmp2(m);
expr* fml1 = g->form(idx1);
expr* fml2 = g->form(idx2);
TRACE("pb", tout << mk_pp(fml1, m) << " " << mk_pp(fml2, m) << "\n";);
TRACE(pb, tout << mk_pp(fml1, m) << " " << mk_pp(fml2, m) << "\n";);
expr_ref_vector args1(m), args2(m);
vector<rational> coeffs1, coeffs2;
rational k1, k2;
@ -482,7 +482,7 @@ private:
m.is_not(x, x);
if (!is_app(x) || !m_vars.contains(to_app(x)))
return;
TRACE("pb", tout << mk_pp(x, m) << "\n";);
TRACE(pb, tout << mk_pp(x, m) << "\n";);
rec const& r = m_vars.find(to_app(x));
if (r.pos.size() != 1 || r.neg.size() != 1)
return;
@ -527,7 +527,7 @@ private:
verbose_stream() << "resolve: " << mk_pp(fml1, m) << "\n" << mk_pp(fml2, m) << "\n" << tmp1 << "\n";
verbose_stream() << "to\n" << mk_pp(fml2, m) << " -> " << tmp2 << "\n";);
TRACE("pb",
TRACE(pb,
tout << "resolve: " << mk_pp(fml1, m) << "\n" << mk_pp(fml2, m) << "\n" << tmp1 << "\n";
tout << "to\n" << mk_pp(fml2, m) << " -> " << tmp2 << "\n";);
@ -595,7 +595,7 @@ private:
if (!m.is_true(f)) {
m_r(f, tmp, new_pr);
if (tmp != f) {
TRACE("pb", tout << mk_pp(f, m) << " -> " << tmp
TRACE(pb, tout << mk_pp(f, m) << " -> " << tmp
<< " by " << mk_pp(e, m) << " |-> " << mk_pp(v, m) << "\n";);
IF_VERBOSE(3, verbose_stream() << "replace " << mk_pp(f, m) << " -> " << tmp << "\n";);
if (g->proofs_enabled()) {

View file

@ -103,7 +103,7 @@ class propagate_values_tactic : public tactic {
expr * lhs, * value;
bool inverted = false;
if (is_shared_eq(new_curr, lhs, value, inverted)) {
TRACE("shallow_context_simplifier_bug", tout << "found eq:\n" << mk_ismt2_pp(new_curr, m) << "\n" << mk_ismt2_pp(new_pr, m) << "\n";);
TRACE(shallow_context_simplifier_bug, tout << "found eq:\n" << mk_ismt2_pp(new_curr, m) << "\n" << mk_ismt2_pp(new_pr, m) << "\n";);
if (inverted && new_pr) new_pr = m.mk_symmetry(new_pr);
m_subst->insert(lhs, value, new_pr, new_d);
}
@ -123,7 +123,7 @@ class propagate_values_tactic : public tactic {
new_pr = m.mk_reflexivity(curr);
}
TRACE("shallow_context_simplifier_bug", tout << mk_ismt2_pp(curr, m) << "\n---->\n" << new_curr << "\n" << new_pr << "\n";);
TRACE(shallow_context_simplifier_bug, tout << mk_ismt2_pp(curr, m) << "\n---->\n" << new_curr << "\n" << new_pr << "\n";);
if (new_curr != curr) {
m_modified = true;
}
@ -157,7 +157,7 @@ class propagate_values_tactic : public tactic {
m_occs(*m_goal);
while (true) {
TRACE("propagate_values", tout << "while(true) loop\n"; m_goal->display_with_dependencies(tout););
TRACE(propagate_values, tout << "while(true) loop\n"; m_goal->display_with_dependencies(tout););
if (forward) {
for (; m_idx < size; m_idx++) {
process_current();
@ -193,15 +193,15 @@ class propagate_values_tactic : public tactic {
if (round >= m_max_rounds)
break;
IF_VERBOSE(100, verbose_stream() << "starting new round, goal size: " << m_goal->num_exprs() << std::endl;);
TRACE("propagate_values", tout << "round finished\n"; m_goal->display(tout); tout << "\n";);
TRACE(propagate_values, tout << "round finished\n"; m_goal->display(tout); tout << "\n";);
}
end:
m_goal->elim_redundancies();
m_goal->inc_depth();
result.push_back(m_goal);
SASSERT(m_goal->is_well_formed());
TRACE("propagate_values", tout << "end\n"; m_goal->display(tout););
TRACE("propagate_values_core", m_goal->display_with_dependencies(tout););
TRACE(propagate_values, tout << "end\n"; m_goal->display(tout););
TRACE(propagate_values_core, m_goal->display_with_dependencies(tout););
m_goal = nullptr;
}

View file

@ -151,7 +151,7 @@ class reduce_args_tactic : public tactic {
quick_for_each_expr(proc, visited, g.form(i));
}
TRACE("reduce_args", tout << "non_candidates:\n";
TRACE(reduce_args, tout << "non_candidates:\n";
for (func_decl* d : non_candidates)
tout << d->get_name() << "\n";
);
@ -230,7 +230,7 @@ class reduce_args_tactic : public tactic {
for (func_decl* a : bad_decls)
decl2args.erase(a);
TRACE("reduce_args", tout << "decl2args:" << std::endl;
TRACE(reduce_args, tout << "decl2args:" << std::endl;
for (auto const& [k, v] : decl2args) {
tout << k->get_name() << ": ";
for (unsigned i = 0; i < v.size(); ++i)
@ -412,7 +412,7 @@ class reduce_args_tactic : public tactic {
void operator()(goal & g) {
if (g.inconsistent())
return;
TRACE("reduce_args", g.display(tout););
TRACE(reduce_args, g.display(tout););
tactic_report report("reduce-args", g);
obj_hashtable<func_decl> non_candidates;
obj_map<func_decl, bit_vector> decl2args;
@ -439,7 +439,7 @@ class reduce_args_tactic : public tactic {
if (g.models_enabled())
g.add(mk_mc(decl2args, ctx.m_decl2arg2funcs));
TRACE("reduce_args", g.display(tout); if (g.mc()) g.mc()->display(tout););
TRACE(reduce_args, g.display(tout); if (g.mc()) g.mc()->display(tout););
}
public:

View file

@ -63,9 +63,9 @@ struct simplify_tactic::imp {
}
g.update(idx, new_curr, new_pr, g.dep(idx));
}
TRACE("simplifier", g.display(tout););
TRACE(simplifier, g.display(tout););
g.elim_redundancies();
TRACE("after_simplifier_detail", g.display_with_dependencies(tout););
TRACE(after_simplifier_detail, g.display_with_dependencies(tout););
}
unsigned get_num_steps() const { return m_num_steps; }

View file

@ -30,7 +30,7 @@ void special_relations_tactic::collect_feature(goal const& g, unsigned idx,
unsigned index = 0;
app_ref_vector patterns(m);
bool is_match = m_pm.match_quantifier_index(to_quantifier(f), patterns, index);
TRACE("special_relations", tout << "check " << is_match << " " << mk_pp(f, m) << "\n";
TRACE(special_relations, tout << "check " << is_match << " " << mk_pp(f, m) << "\n";
if (is_match) tout << patterns << " " << index << "\n";);
if (is_match) {
p = to_app(patterns.get(0)->get_arg(0))->get_decl();
@ -113,7 +113,7 @@ void special_relations_tactic::initialize() {
q = m.mk_forall(2, As, xyz, fml, 0, symbol::null, symbol::null, 1, pats);
register_pattern(m_pm.initialize(q), sr_total);
TRACE("special_relations", m_pm.display(tout););
TRACE(special_relations, m_pm.display(tout););
}
void special_relations_tactic::register_pattern(unsigned index, sr_property p) {
@ -154,7 +154,7 @@ void special_relations_tactic::operator()(goal_ref const & g, goal_ref_buffer &
to_delete.append(kv.m_value.m_goal_indices);
break;
default:
TRACE("special_relations", tout << "unprocessed feature " << feature << "\n";);
TRACE(special_relations, tout << "unprocessed feature " << feature << "\n";);
break;
}
}

View file

@ -100,7 +100,7 @@ public:
void operator()(goal_ref const & in,
goal_ref_buffer & result) override {
tactic_report report("split-clause", *in);
TRACE("before_split_clause", in->display(tout););
TRACE(before_split_clause, in->display(tout););
ast_manager & m = in->m();
unsigned cls_pos = select_clause(m, in);
if (cls_pos == UINT_MAX) {

View file

@ -148,7 +148,7 @@ public:
g.assert_expr(mem);
num_sym_break_preds++;
TRACE("symmetry_reduce", tout << "member predicate: " << mem << "\n";);
TRACE(symmetry_reduce, tout << "member predicate: " << mem << "\n";);
fml = m.mk_and(fml.get(), mem);
normalize(fml);
@ -191,7 +191,7 @@ private:
if (!is_const)
continue;
P.push_back(v);
TRACE("symmetry_reduce", for (app * a : v) tout << mk_pp(a, m) << " "; tout << "\n";);
TRACE(symmetry_reduce, for (app * a : v) tout << mk_pp(a, m) << " "; tout << "\n";);
}
}
@ -402,7 +402,7 @@ private:
SASSERT(p.size() >= 2);
bool result = check_swap(fml, p[0], p[1]) && check_cycle(fml, p);
TRACE("symmetry_reduce",
TRACE(symmetry_reduce,
if (result) {
tout << "Symmetric: ";
}
@ -520,7 +520,7 @@ private:
unsigned weight = 0, weight1 = 0;
VERIFY(occs.find(t, weight));
unsigned cts_delta = compute_cts_delta(t, cts, consts);
TRACE("symmetry_reduce", tout << mk_pp(t, m) << " " << weight << " " << cts_delta << "\n";);
TRACE(symmetry_reduce, tout << mk_pp(t, m) << " " << weight << " " << cts_delta << "\n";);
for (unsigned i = 1; i < T.size(); ++i) {
app* t1 = T[i];
VERIFY(occs.find(t1, weight1));
@ -528,7 +528,7 @@ private:
continue;
}
unsigned cts_delta1 = compute_cts_delta(t1, cts, consts);
TRACE("symmetry_reduce", tout << mk_pp(t1, m) << " " << weight1 << " " << cts_delta1 << "\n";);
TRACE(symmetry_reduce, tout << mk_pp(t1, m) << " " << weight1 << " " << cts_delta1 << "\n";);
if ((t->get_num_args() == t1->get_num_args() && (weight1 > weight || cts_delta1 < cts_delta)) ||
t->get_num_args() > t1->get_num_args()) {
cts_delta = cts_delta1;
@ -556,7 +556,7 @@ private:
void compute_used_in(app* t, term_set& cts, term_set const& consts) {
member_of mem(consts, cts);
for_each_expr(mem, t);
TRACE("symmetry_reduce",
TRACE(symmetry_reduce,
tout << "Term: " << mk_pp(t, m) << "\n";
tout << "Support set: ";
for (unsigned i = 0; i < consts.size(); ++i) {

View file

@ -159,7 +159,7 @@ class tseitin_cnf_tactic : public tactic {
mk_lit(n, sign, r);
return;
default:
TRACE("tseitin_cnf_bug", tout << f->get_name() << "\n";);
TRACE(tseitin_cnf_bug, tout << f->get_name() << "\n";);
UNREACHABLE();
return;
}
@ -839,7 +839,7 @@ class tseitin_cnf_tactic : public tactic {
m_produce_models = g->models_enabled();
m_produce_unsat_cores = g->unsat_core_enabled();
TRACE("tseitin_cnf", g->display(tout););
TRACE(tseitin_cnf, g->display(tout););
m_occs(*g);
reset_cache();

View file

@ -194,7 +194,7 @@ public:
if (!offset.is_zero()) {
value = m_arith.mk_add(value, m_arith.mk_numeral(offset, true));
}
TRACE("int2bv", tout << mk_pp(kv.m_key, m) << " " << value << "\n";);
TRACE(int2bv, tout << mk_pp(kv.m_key, m) << " " << value << "\n";);
mc->add(kv.m_key, value);
}
return mc;
@ -297,11 +297,11 @@ private:
if (!offset.is_zero()) {
t = m_arith.mk_add(t, m_arith.mk_numeral(offset, true));
}
TRACE("pb", tout << lo << " <= " << hi << " offset: " << offset << "\n"; tout << mk_pp(e, m) << " |-> " << t << "\n";);
TRACE(pb, tout << lo << " <= " << hi << " offset: " << offset << "\n"; tout << mk_pp(e, m) << " |-> " << t << "\n";);
sub.insert(e, t);
}
else {
TRACE("pb",
TRACE(pb,
tout << "unprocessed entry: " << mk_pp(e, m) << "\n";
if (bm.has_lower(e, lo, s1)) {
tout << "lower: " << lo << " " << s1 << "\n";
@ -333,7 +333,7 @@ private:
bound_manager& bm = *m_bounds.back();
for (expr* a : m_assertions)
bm(a, nullptr, nullptr);
TRACE("int2bv", bm.display(tout););
TRACE(int2bv, bm.display(tout););
expr_safe_replace sub(m);
accumulate_sub(sub);
proof_ref proof(m);
@ -350,7 +350,7 @@ private:
return;
}
m_solver->assert_expr(fml2);
TRACE("int2bv", tout << fml2 << "\n";);
TRACE(int2bv, tout << fml2 << "\n";);
}
}
m_assertions.reset();

View file

@ -404,7 +404,7 @@ namespace smtfd {
smtfd_abs& get_abs() { return m_abs; }
void add(expr* f, char const* msg) { m_lemmas.push_back(f); TRACE("smtfd", tout << msg << " " << mk_bounded_pp(f, m, 2) << "\n";); }
void add(expr* f, char const* msg) { m_lemmas.push_back(f); TRACE(smtfd, tout << msg << " " << mk_bounded_pp(f, m, 2) << "\n";); }
ast_manager& get_manager() { return m; }
@ -546,13 +546,13 @@ namespace smtfd {
f_app f1 = mk_app(f, t, s);
f_app const& f2 = insert(f1);
if (f2.m_val_offset == f1.m_val_offset) {
TRACE("smtfd_verbose", tout << "fresh: " << mk_pp(f, m, 2) << "\n";);
TRACE(smtfd_verbose, tout << "fresh: " << mk_pp(f, m, 2) << "\n";);
return;
}
bool eq = value_of(f1) == value_of(f2);
m_values.shrink(f1.m_val_offset);
if (eq) {
TRACE("smtfd_verbose", tout << "eq: " << " " << mk_bounded_pp(t, m, 2) << " " << mk_bounded_pp(f2.m_t, m, 2) << "\n";);
TRACE(smtfd_verbose, tout << "eq: " << " " << mk_bounded_pp(t, m, 2) << " " << mk_bounded_pp(f2.m_t, m, 2) << "\n";);
return;
}
m_args.reset();
@ -563,7 +563,7 @@ namespace smtfd {
expr* e2 = f2.m_t->get_arg(i);
if (e1 != e2) m_args.push_back(m.mk_eq(e1, e2));
}
TRACE("smtfd_verbose", tout << "diff: " << mk_bounded_pp(f1.m_t, m, 2) << " " << mk_bounded_pp(f2.m_t, m, 2) << "\n";);
TRACE(smtfd_verbose, tout << "diff: " << mk_bounded_pp(f1.m_t, m, 2) << " " << mk_bounded_pp(f2.m_t, m, 2) << "\n";);
m_context.add(m.mk_implies(mk_and(m_args), m.mk_eq(f1.m_t, f2.m_t)), __FUNCTION__);
}
@ -797,7 +797,7 @@ namespace smtfd {
void check_term(expr* t, unsigned round) override {
sort* s = t->get_sort();
if (round == 0 && is_uf(t)) {
TRACE("smtfd_verbose", tout << "check-term: " << mk_bounded_pp(t, m, 2) << "\n";);
TRACE(smtfd_verbose, tout << "check-term: " << mk_bounded_pp(t, m, 2) << "\n";);
enforce_congruence(to_app(t)->get_decl(), to_app(t), s);
}
else if (round == 1 && sort_covered(s) && m.is_value(t)) {
@ -860,7 +860,7 @@ namespace smtfd {
args.push_back(model_value(arg));
}
expr_ref val = model_value(f.m_t);
TRACE("smtfd_verbose", tout << mk_bounded_pp(f.m_t, m, 2) << " := " << val << "\n";);
TRACE(smtfd_verbose, tout << mk_bounded_pp(f.m_t, m, 2) << " := " << val << "\n";);
fi->insert_new_entry(args.data(), val);
}
mdl->register_decl(fn, fi);
@ -930,7 +930,7 @@ namespace smtfd {
void check_select(app* t) {
expr* a = t->get_arg(0);
expr_ref vA = eval_abs(a);
TRACE("smtfd", tout << mk_bounded_pp(t, m, 2) << "\n";);
TRACE(smtfd, tout << mk_bounded_pp(t, m, 2) << "\n";);
enforce_congruence(vA, t, a->get_sort());
}
@ -948,7 +948,7 @@ namespace smtfd {
expr_ref val2 = eval_abs(stored_value);
// A[i] = v
if (val1 != val2) {
TRACE("smtfd", tout << "select/store: " << mk_bounded_pp(t, m, 2) << "\n";);
TRACE(smtfd, tout << "select/store: " << mk_bounded_pp(t, m, 2) << "\n";);
m_context.add(m.mk_eq(sel, stored_value), __FUNCTION__);
m_pinned.push_back(sel);
insert_select(sel);
@ -993,7 +993,7 @@ namespace smtfd {
app_ref sel(m_autil.mk_select(m_args), m);
val2 = eval_abs(sel);
if (val1 != val2 && !m.is_true(eqV)) {
TRACE("smtfd", tout << "select/store: " << mk_bounded_pp(t, m, 2) << "\n";);
TRACE(smtfd, tout << "select/store: " << mk_bounded_pp(t, m, 2) << "\n";);
m_context.add(m.mk_or(m.mk_eq(sel, t), mk_and(eqs)), __FUNCTION__);
m_pinned.push_back(sel);
insert_select(sel);
@ -1063,7 +1063,7 @@ namespace smtfd {
m_args.push_back(arg);
}
SASSERT(t->get_sort() == a->get_sort());
TRACE("smtfd", tout << mk_bounded_pp(t, m, 2) << " " << mk_bounded_pp(f.m_t, m, 2) << "\n";);
TRACE(smtfd, tout << mk_bounded_pp(t, m, 2) << " " << mk_bounded_pp(f.m_t, m, 2) << "\n";);
expr_ref eq = mk_eq_idxs(t, f.m_t);
m_args[0] = t;
expr_ref sel1(m_autil.mk_select(m_args), m);
@ -1159,7 +1159,7 @@ namespace smtfd {
expr_ref b1(m_autil.mk_select(args), m);
expr_ref ext(m.mk_iff(m.mk_eq(a1, b1), m.mk_eq(a, b)), m);
if (!m.is_true(eval_abs(ext))) {
TRACE("smtfd", tout << mk_bounded_pp(a, m, 2) << " " << mk_bounded_pp(b, m, 2) << "\n";);
TRACE(smtfd, tout << mk_bounded_pp(a, m, 2) << " " << mk_bounded_pp(b, m, 2) << "\n";);
m_context.add(ext, __FUNCTION__);
}
}
@ -1414,7 +1414,7 @@ namespace smtfd {
if (is_exists(q) && m.is_false(tmp)) {
return l_false;
}
TRACE("smtfd",
TRACE(smtfd,
tout << mk_pp(q, m) << "\n";
/*tout << *m_model << "\n"; */
tout << "eval: " << tmp << "\n";);
@ -1441,7 +1441,7 @@ namespace smtfd {
m_solver->assert_expr(body);
lbool r = m_solver->check_sat(0, nullptr);
model_ref mdl;
TRACE("smtfd", tout << "check: " << r << "\n";);
TRACE(smtfd, tout << "check: " << r << "\n";);
if (r == l_true) {
expr_ref qq(q->get_expr(), m);
@ -1449,7 +1449,7 @@ namespace smtfd {
init_term(t);
}
m_solver->get_model(mdl);
TRACE("smtfd", tout << *mdl << "\n";);
TRACE(smtfd, tout << *mdl << "\n";);
for (unsigned i = 0; i < sz; ++i) {
app* v = to_app(vars.get(i));
@ -1473,7 +1473,7 @@ namespace smtfd {
if (r == l_true) {
body = subst(q->get_expr(), vals.size(), vals.data());
m_context.rewrite(body);
TRACE("smtfd", tout << "vals: " << vals << "\n" << body << "\n";);
TRACE(smtfd, tout << "vals: " << vals << "\n" << body << "\n";);
if (is_forall(q)) {
body = m.mk_implies(q, body);
}
@ -1632,7 +1632,7 @@ namespace smtfd {
m_assertions.pop_back();
expr* toggle = add_toggle(m.mk_fresh_const("toggle", m.mk_bool_sort()));
m_assertions_qhead = m_assertions.size();
TRACE("smtfd", tout << "flush: " << m_assertions_qhead << " " << mk_bounded_pp(fml, m, 3) << "\n";);
TRACE(smtfd, tout << "flush: " << m_assertions_qhead << " " << mk_bounded_pp(fml, m, 3) << "\n";);
fml = abs(fml);
m_fd_sat_solver->assert_expr(fml);
fml = m.mk_not(m.mk_and(toggle, fml));
@ -1644,12 +1644,12 @@ namespace smtfd {
lbool check_abs(unsigned num_assumptions, expr * const * assumptions) {
expr_ref_vector asms(m);
init_assumptions(num_assumptions, assumptions, asms);
TRACE("smtfd",
TRACE(smtfd,
for (unsigned i = 0; i < num_assumptions; ++i) {
tout << mk_bounded_pp(assumptions[i], m, 3) << "\n";
}
display(tout << asms << "\n"););
TRACE("smtfd_verbose", m_fd_sat_solver->display(tout););
TRACE(smtfd_verbose, m_fd_sat_solver->display(tout););
lbool r = m_fd_sat_solver->check_sat(asms);
update_reason_unknown(r, m_fd_sat_solver);
@ -1663,12 +1663,12 @@ namespace smtfd {
m_fd_sat_solver->get_model(m_model);
m_model->set_model_completion(true);
init_model_assumptions(num_assumptions, assumptions, asms);
TRACE("smtfd", display(tout << asms << "\n" << *m_model << "\n"););
TRACE(smtfd, display(tout << asms << "\n" << *m_model << "\n"););
lbool r = m_fd_core_solver->check_sat(asms);
update_reason_unknown(r, m_fd_core_solver);
if (r == l_false) {
m_fd_core_solver->get_unsat_core(core);
TRACE("smtfd", display(tout << core << "\n"););
TRACE(smtfd, display(tout << core << "\n"););
SASSERT(asms.contains(m_toggles.back()));
SASSERT(core.contains(m_toggles.back()));
core.erase(m_toggles.back());
@ -1684,7 +1684,7 @@ namespace smtfd {
for (unsigned round = 0; !m_context.at_max() && m_context.add_theory_axioms(terms, round); ++round) {}
TRACE("smtfd", m_context.display(tout););
TRACE(smtfd, m_context.display(tout););
for (expr* f : m_context) {
assert_fd(f);
}
@ -1713,7 +1713,7 @@ namespace smtfd {
}
m_context.populate_model(m_model, terms);
TRACE("smtfd",
TRACE(smtfd,
tout << "axioms: " << m_axioms << "\n";
for (expr* a : subterms::ground(terms)) {
expr_ref val0 = (*m_model)(a);
@ -1885,7 +1885,7 @@ namespace smtfd {
}
void flush_atom_defs() {
CTRACE("smtfd", !m_abs.atom_defs().empty(), for (expr* f : m_abs.atom_defs()) tout << mk_bounded_pp(f, m, 4) << "\n";);
CTRACE(smtfd, !m_abs.atom_defs().empty(), for (expr* f : m_abs.atom_defs()) tout << mk_bounded_pp(f, m, 4) << "\n";);
for (expr* f : m_abs.atom_defs()) {
m_fd_sat_solver->assert_expr(f);
m_fd_core_solver->assert_expr(f);
@ -1896,8 +1896,8 @@ namespace smtfd {
void assert_fd(expr* fml) {
expr_ref _fml(fml, m);
TRACE("smtfd", tout << mk_bounded_pp(fml, m, 3) << "\n";);
CTRACE("smtfd", m_axioms.contains(fml),
TRACE(smtfd, tout << mk_bounded_pp(fml, m, 3) << "\n";);
CTRACE(smtfd, m_axioms.contains(fml),
tout << "formula:\n" << _fml << "\n";
tout << "axioms:\n" << m_axioms << "\n";
tout << "assertions:\n" << m_assertions << "\n";);
@ -1906,7 +1906,7 @@ namespace smtfd {
SASSERT(!m_axioms.contains(fml));
m_axioms.push_back(fml);
_fml = abs(fml);
TRACE("smtfd", tout << mk_bounded_pp(_fml, m, 3) << "\n";);
TRACE(smtfd, tout << mk_bounded_pp(_fml, m, 3) << "\n";);
m_fd_sat_solver->assert_expr(_fml);
m_fd_core_solver->assert_expr(_fml);
flush_atom_defs();
@ -1914,7 +1914,7 @@ namespace smtfd {
void block_core(expr_ref_vector const& core) {
expr_ref fml(m.mk_not(mk_and(core)), m);
TRACE("smtfd", tout << "block:\n" << mk_bounded_pp(fml, m, 3) << "\n" << mk_bounded_pp(abs(fml), m, 3) << "\n";);
TRACE(smtfd, tout << "block:\n" << mk_bounded_pp(fml, m, 3) << "\n" << mk_bounded_pp(abs(fml), m, 3) << "\n";);
assert_fd(fml);
}
@ -1982,7 +1982,7 @@ namespace smtfd {
}
IF_VERBOSE(1, indent(); verbose_stream() << "(smtfd-round :round " << round << " :lemmas " << m_context.size() << ")\n");
round = 0;
TRACE("smtfd_verbose",
TRACE(smtfd_verbose,
for (expr* f : m_context) tout << "refine " << mk_bounded_pp(f, m, 3) << "\n";
m_context.display(tout););
for (expr* f : m_context) {

View file

@ -33,7 +33,7 @@ model_converter * fpa2bv_model_converter::translate(ast_translation & translator
}
void fpa2bv_model_converter::convert(model_core * mc, model * float_mdl) {
TRACE("fpa2bv_mc", tout << "BV Model: " << std::endl;
TRACE(fpa2bv_mc, tout << "BV Model: " << std::endl;
for (unsigned i = 0; i < mc->get_num_constants(); i++)
tout << mc->get_constant(i)->get_name() << " --> " <<
mk_ismt2_pp(mc->get_const_interp(mc->get_constant(i)), m) << std::endl;
@ -69,7 +69,7 @@ void fpa2bv_model_converter::convert(model_core * mc, model * float_mdl) {
for (unsigned i = 0; i < sz; i++) {
func_decl * f = mc->get_function(i);
if (!seen.contains(f)) {
TRACE("fpa2bv_mc", tout << "Keeping: " << mk_ismt2_pp(f, m) << std::endl;);
TRACE(fpa2bv_mc, tout << "Keeping: " << mk_ismt2_pp(f, m) << std::endl;);
func_interp * val = mc->get_func_interp(f)->copy();
float_mdl->register_decl(f, val);
}

View file

@ -46,7 +46,7 @@ class fpa2bv_tactic : public tactic {
tactic_report report("fpa2bv", *g);
m_rw.reset();
TRACE("fpa2bv", g->display(tout << "BEFORE: " << std::endl););
TRACE(fpa2bv, g->display(tout << "BEFORE: " << std::endl););
if (g->inconsistent()) {
result.push_back(g.get());
@ -98,7 +98,7 @@ class fpa2bv_tactic : public tactic {
result.back()->assert_expr(e, pr);
}
TRACE("fpa2bv", g->display(tout << "AFTER:\n");
TRACE(fpa2bv, g->display(tout << "AFTER:\n");
if (g->mc()) g->mc()->display(tout); tout << std::endl; );
}
};

View file

@ -254,7 +254,7 @@ void goal::assert_expr(expr * f, proof * pr, expr_dependency * d) {
}
SASSERT(!proofs_enabled() || pr);
if (pr) {
CTRACE("goal", f != m().get_fact(pr), tout << mk_pp(f, m()) << "\n" << mk_pp(pr, m()) << "\n";);
CTRACE(goal, f != m().get_fact(pr), tout << mk_pp(f, m()) << "\n" << mk_pp(pr, m()) << "\n";);
SASSERT(f == m().get_fact(pr));
slow_process(f, pr, d);
}
@ -599,7 +599,7 @@ bool goal::is_well_formed() const {
return false;
#if 0
if (pr(i) && m().get_fact(pr(i)) != form(i)) {
TRACE("tactic", tout << mk_ismt2_pp(pr(i), m()) << "\n" << mk_ismt2_pp(form(i), m()) << "\n";);
TRACE(tactic, tout << mk_ismt2_pp(pr(i), m()) << "\n" << mk_ismt2_pp(form(i), m()) << "\n";);
SASSERT(m().get_fact(pr(i)) == form(i));
return false;
}

View file

@ -145,7 +145,7 @@ public:
}
void operator()(goal_ref const& g, goal_ref_buffer& result) override {
TRACE("tactic", tout << "params: " << m_params << "\n"; g->display(tout););
TRACE(tactic, tout << "params: " << m_params << "\n"; g->display(tout););
tactic_report report("subsumption", *g);
vector<std::pair<unsigned, expr_ref>> fmls;

View file

@ -93,7 +93,7 @@ public:
if (g->models_enabled()) {
model_ref mdl = m_sls->get_model();
mc = model2model_converter(mdl.get());
TRACE("sls_model", mc->display(tout););
TRACE(sls_model, mc->display(tout););
}
g->reset();
}
@ -105,7 +105,7 @@ public:
goal_ref_buffer& result) override {
result.reset();
TRACE("sls", g->display(tout););
TRACE(sls, g->display(tout););
tactic_report report("sls", *g);
model_converter_ref mc;
@ -186,7 +186,7 @@ public:
if (g->models_enabled()) {
model_ref mdl = m_engine->get_model();
mc = model2model_converter(mdl.get());
TRACE("sls_model", mc->display(tout););
TRACE(sls_model, mc->display(tout););
}
g->reset();
}
@ -199,7 +199,7 @@ public:
goal_ref_buffer & result) override {
result.reset();
TRACE("sls", g->display(tout););
TRACE(sls, g->display(tout););
tactic_report report("sls", *g);
model_converter_ref mc;

View file

@ -59,7 +59,7 @@ public:
fail_if_unsat_core_generation("qfufbv_ackr", g);
fail_if_proof_generation("qfufbv_ackr", g);
TRACE("goal", g->display(tout););
TRACE(goal, g->display(tout););
// running implementation
ptr_vector<expr> flas;
const unsigned sz = g->size();

View file

@ -78,7 +78,7 @@ tactic * mk_uflra_tactic(ast_manager & m, params_ref const & p) {
tactic * mk_auflia_tactic(ast_manager & m, params_ref const & p) {
params_ref qi_p;
qi_p.set_str("qi.cost", "0");
TRACE("qi_cost", qi_p.display(tout); tout << "\n" << qi_p.get_str("qi.cost", "<null>") << "\n";);
TRACE(qi_cost, qi_p.display(tout); tout << "\n" << qi_p.get_str("qi.cost", "<null>") << "\n";);
tactic * st = and_then(mk_no_solve_eq_preprocessor(m),
or_else(and_then(fail_if(mk_gt(mk_num_exprs_probe(), mk_const_probe(static_cast<double>(128)))),
using_params(mk_smt_tactic(m), qi_p),

View file

@ -34,14 +34,14 @@ struct tactic_report::imp {
m_goal(g),
m_start_memory(static_cast<double>(memory::get_allocation_size())/static_cast<double>(1024*1024)) {
m_watch.start();
TRACE("tactic", g.display_with_proofs(tout << id << "\n"););
TRACE(tactic, g.display_with_proofs(tout << id << "\n"););
SASSERT(g.is_well_formed());
}
~imp() {
m_watch.stop();
double end_memory = static_cast<double>(memory::get_allocation_size())/static_cast<double>(1024*1024);
TRACE("tactic", m_goal.display(tout << m_id << "\n");
TRACE(tactic, m_goal.display(tout << m_id << "\n");
if (m_goal.mc()) m_goal.mc()->display(tout);
);
IF_VERBOSE(0,
@ -227,13 +227,13 @@ lbool check_sat(tactic & t, goal_ref & g, model_ref & md, labels_vec & labels, p
if (r.size() > 0) pr = r[0]->pr(0);
return l_undef;
}
TRACE("tactic",
TRACE(tactic,
tout << "r.size(): " << r.size() << "\n";
for (unsigned i = 0; i < r.size(); i++) r[i]->display_with_dependencies(tout););
if (r.size() > 0) {
pr = r[0]->pr(0);
CTRACE("tactic", pr, tout << pr << "\n";);
CTRACE(tactic, pr, tout << pr << "\n";);
}
if (is_decided_sat(r)) {

View file

@ -288,7 +288,7 @@ public:
}
void updt_params(params_ref const & p) override {
TRACE("nary_tactical_updt_params", tout << "updt_params: " << p << "\n";);
TRACE(nary_tactical_updt_params, tout << "updt_params: " << p << "\n";);
for (tactic* t : m_ts) t->updt_params(p);
}
@ -1076,7 +1076,7 @@ public:
char const* name() const override { return "using_params"; }
void updt_params(params_ref const & p) override {
TRACE("using_params",
TRACE(using_params,
tout << "before p: " << p << "\n";
tout << "m_params: " << m_params << "\n";);
@ -1084,7 +1084,7 @@ public:
new_p.append(m_params);
unary_tactical::updt_params(new_p);
TRACE("using_params",
TRACE(using_params,
tout << "after p: " << p << "\n";
tout << "m_params: " << m_params << "\n";
tout << "new_p: " << new_p << "\n";);

View file

@ -41,7 +41,7 @@ class macro_finder_tactic : public tactic {
void operator()(goal_ref const & g,
goal_ref_buffer & result) {
tactic_report report("macro-finder", *g);
TRACE("macro-finder", g->display(tout););
TRACE(macro_finder, g->display(tout););
recfun::util rec(m());
if (!rec.get_rec_funs().empty()) {