mirror of
https://github.com/Z3Prover/z3
synced 2025-08-02 01:13:18 +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
|
@ -33,9 +33,9 @@ namespace sat {
|
|||
vector<cut_set> const& aig_cuts::operator()() {
|
||||
if (m_config.m_full) flush_roots();
|
||||
unsigned_vector node_ids = filter_valid_nodes();
|
||||
TRACE("cut_simplifier", display(tout););
|
||||
TRACE(cut_simplifier, display(tout););
|
||||
augment(node_ids);
|
||||
TRACE("cut_simplifier", display(tout););
|
||||
TRACE(cut_simplifier, display(tout););
|
||||
++m_num_cut_calls;
|
||||
return m_cuts;
|
||||
}
|
||||
|
@ -328,13 +328,13 @@ namespace sat {
|
|||
}
|
||||
else if (m_aig[v][0].is_const() || !insert_aux(v, n)) {
|
||||
m_literals.shrink(m_literals.size() - n.size());
|
||||
TRACE("cut_simplifier", tout << "duplicate\n";);
|
||||
TRACE(cut_simplifier, tout << "duplicate\n";);
|
||||
}
|
||||
SASSERT(!m_aig[v].empty());
|
||||
}
|
||||
|
||||
void aig_cuts::add_node(bool_var v, uint64_t lut, unsigned sz, bool_var const* args) {
|
||||
TRACE("cut_simplifier", tout << v << " == " << cut::table2string(sz, lut) << " " << bool_var_vector(sz, args) << "\n";);
|
||||
TRACE(cut_simplifier, tout << v << " == " << cut::table2string(sz, lut) << " " << bool_var_vector(sz, args) << "\n";);
|
||||
reserve(v);
|
||||
unsigned offset = m_literals.size();
|
||||
node n(lut, sz, offset);
|
||||
|
@ -346,7 +346,7 @@ namespace sat {
|
|||
}
|
||||
|
||||
void aig_cuts::add_node(literal head, bool_op op, unsigned sz, literal const* args) {
|
||||
TRACE("cut_simplifier", tout << head << " == " << op << " " << literal_vector(sz, args) << "\n";);
|
||||
TRACE(cut_simplifier, tout << head << " == " << op << " " << literal_vector(sz, args) << "\n";);
|
||||
unsigned v = head.var();
|
||||
reserve(v);
|
||||
unsigned offset = m_literals.size();
|
||||
|
@ -407,7 +407,7 @@ namespace sat {
|
|||
flush_roots(to_root, cs);
|
||||
}
|
||||
m_roots.reset();
|
||||
TRACE("cut_simplifier", display(tout););
|
||||
TRACE(cut_simplifier, display(tout););
|
||||
}
|
||||
|
||||
bool aig_cuts::flush_roots(bool_var var, to_root const& to_root, node& n) {
|
||||
|
@ -711,7 +711,7 @@ namespace sat {
|
|||
m_clause.push_back(lit);
|
||||
}
|
||||
m_clause.push_back(parity ? r : ~r);
|
||||
TRACE("cut_simplifier", tout << "validate: " << m_clause << "\n";);
|
||||
TRACE(cut_simplifier, tout << "validate: " << m_clause << "\n";);
|
||||
on_clause(m_clause);
|
||||
}
|
||||
return;
|
||||
|
@ -726,7 +726,7 @@ namespace sat {
|
|||
m_clause.push_back(lit);
|
||||
}
|
||||
m_clause.push_back(0 == (n.lut() & (1ull << i)) ? ~r : r);
|
||||
TRACE("cut_simplifier", tout << n.lut() << " " << m_clause << "\n";);
|
||||
TRACE(cut_simplifier, tout << n.lut() << " " << m_clause << "\n";);
|
||||
on_clause(m_clause);
|
||||
}
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue