mirror of
https://github.com/Z3Prover/z3
synced 2026-01-23 02:24:01 +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
|
|
@ -80,7 +80,7 @@ class skolemizer {
|
|||
|
||||
void process(quantifier * q, expr_ref & r, proof_ref & p) {
|
||||
if (q->get_kind() == lambda_k) {
|
||||
TRACE("nnf", tout << expr_ref(q, m) << "\n";);
|
||||
TRACE(nnf, tout << expr_ref(q, m) << "\n";);
|
||||
r = q;
|
||||
p = nullptr;
|
||||
return;
|
||||
|
|
@ -99,7 +99,7 @@ class skolemizer {
|
|||
}
|
||||
}
|
||||
|
||||
TRACE("skolemizer", tout << "skid: " << q->get_skid() << "\n";);
|
||||
TRACE(skolemizer, tout << "skid: " << q->get_skid() << "\n";);
|
||||
|
||||
expr_ref_vector substitution(m);
|
||||
unsigned num_decls = q->get_num_decls();
|
||||
|
|
@ -301,7 +301,7 @@ struct nnf::imp {
|
|||
else
|
||||
throw nnf_params_exception("invalid NNF mode");
|
||||
|
||||
TRACE("nnf", tout << "nnf-mode: " << m_mode << " " << mode_sym << "\n" << _p << "\n";);
|
||||
TRACE(nnf, tout << "nnf-mode: " << m_mode << " " << mode_sym << "\n" << _p << "\n";);
|
||||
|
||||
m_ignore_labels = p.ignore_labels();
|
||||
m_max_memory = megabytes_to_bytes(p.max_memory());
|
||||
|
|
@ -706,7 +706,7 @@ struct nnf::imp {
|
|||
}
|
||||
|
||||
bool process_app(app * t, frame & fr) {
|
||||
TRACE("nnf", tout << mk_ismt2_pp(t, m) << "\n";);
|
||||
TRACE(nnf, tout << mk_ismt2_pp(t, m) << "\n";);
|
||||
SASSERT(m.is_bool(t));
|
||||
if (t->get_family_id() == m.get_basic_family_id()) {
|
||||
switch (static_cast<basic_op_kind>(t->get_decl_kind())) {
|
||||
|
|
@ -740,7 +740,7 @@ struct nnf::imp {
|
|||
}
|
||||
|
||||
bool process_quantifier(quantifier * q, frame & fr) {
|
||||
TRACE("nnf", tout << expr_ref(q, m) << "\n";);
|
||||
TRACE(nnf, tout << expr_ref(q, m) << "\n";);
|
||||
expr_ref r(m);
|
||||
proof_ref pr(m);
|
||||
if (fr.m_i == 0) {
|
||||
|
|
@ -843,7 +843,7 @@ struct nnf::imp {
|
|||
}
|
||||
|
||||
void process(expr * t, expr_ref & result, proof_ref & result_pr) {
|
||||
TRACE("nnf", tout << "processing:\n" << mk_ismt2_pp(t, m) << "\n";);
|
||||
TRACE(nnf, tout << "processing:\n" << mk_ismt2_pp(t, m) << "\n";);
|
||||
SASSERT(m.is_bool(t));
|
||||
|
||||
if (visit(t, true /* positive polarity */, false /* not nested in quantifier */)) {
|
||||
|
|
@ -909,7 +909,7 @@ struct nnf::imp {
|
|||
|
||||
|
||||
nnf::nnf(ast_manager & m, defined_names & n, params_ref const & p) {
|
||||
TRACE("nnf", tout << "nnf constructor: " << p << "\n";);
|
||||
TRACE(nnf, tout << "nnf constructor: " << p << "\n";);
|
||||
m_imp = alloc(imp, m, n, p);
|
||||
}
|
||||
|
||||
|
|
@ -919,7 +919,7 @@ nnf::~nnf() {
|
|||
|
||||
void nnf::operator()(expr * n, expr_ref_vector & new_defs, proof_ref_vector & new_def_proofs, expr_ref & r, proof_ref & p) {
|
||||
m_imp->operator()(n, new_defs, new_def_proofs, r, p);
|
||||
TRACE("nnf_result", tout << expr_ref(n, r.get_manager()) << "\nNNF result:\n" << new_defs << "\n" << r << "\n";);
|
||||
TRACE(nnf_result, tout << expr_ref(n, r.get_manager()) << "\nNNF result:\n" << new_defs << "\n" << r << "\n";);
|
||||
}
|
||||
|
||||
void nnf::updt_params(params_ref const & p) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue