mirror of
https://github.com/Z3Prover/z3
synced 2025-08-08 12:11: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:
parent
d766292dab
commit
0a93ff515d
583 changed files with 8698 additions and 7299 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue