mirror of
https://github.com/Z3Prover/z3
synced 2026-02-19 23:14:40 +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
|
|
@ -107,7 +107,7 @@ namespace euf {
|
|||
if (!bv.is_bv(x->get_expr()))
|
||||
return;
|
||||
|
||||
TRACE("bv", tout << "merge_eh " << g.bpp(x) << " == " << g.bpp(y) << "\n");
|
||||
TRACE(bv, tout << "merge_eh " << g.bpp(x) << " == " << g.bpp(y) << "\n");
|
||||
SASSERT(!m_internal);
|
||||
flet<bool> _internal(m_internal, true);
|
||||
|
||||
|
|
@ -208,7 +208,7 @@ namespace euf {
|
|||
m_ensure_concat.reset();
|
||||
auto ensure_concat = [&](unsigned lo, unsigned mid, unsigned hi) {
|
||||
// verbose_stream() << lo << " " << mid << " " << hi << "\n";
|
||||
TRACE("bv", tout << "ensure-concat " << lo << " " << mid << " " << hi << "\n");
|
||||
TRACE(bv, tout << "ensure-concat " << lo << " " << mid << " " << hi << "\n");
|
||||
unsigned lo_, hi_;
|
||||
for (enode* p1 : enode_parents(n))
|
||||
if (is_extract(p1, lo_, hi_) && lo_ == lo && hi_ == hi && p1->get_arg(0)->get_root() == arg_r)
|
||||
|
|
@ -218,14 +218,14 @@ namespace euf {
|
|||
};
|
||||
|
||||
auto propagate_above = [&](enode* b) {
|
||||
TRACE("bv", tout << "propagate-above " << g.bpp(b) << "\n");
|
||||
TRACE(bv, tout << "propagate-above " << g.bpp(b) << "\n");
|
||||
for (enode* sib : enode_class(b))
|
||||
if (is_extract(sib, lo2, hi2) && sib->get_arg(0)->get_root() == arg_r && hi1 + 1 == lo2)
|
||||
m_ensure_concat.push_back({lo1, hi1, hi2});
|
||||
};
|
||||
|
||||
auto propagate_below = [&](enode* a) {
|
||||
TRACE("bv", tout << "propagate-below " << g.bpp(a) << "\n");
|
||||
TRACE(bv, tout << "propagate-below " << g.bpp(a) << "\n");
|
||||
for (enode* sib : enode_class(a))
|
||||
if (is_extract(sib, lo2, hi2) && sib->get_arg(0)->get_root() == arg_r && hi2 + 1 == lo1)
|
||||
m_ensure_concat.push_back({lo2, hi2, hi1});
|
||||
|
|
@ -271,7 +271,7 @@ namespace euf {
|
|||
|
||||
|
||||
void bv_plugin::propagate_register_node(enode* n) {
|
||||
TRACE("bv", tout << "register " << g.bpp(n) << "\n");
|
||||
TRACE(bv, tout << "register " << g.bpp(n) << "\n");
|
||||
enode* a, * b;
|
||||
unsigned lo, hi;
|
||||
if (is_concat(n, a, b)) {
|
||||
|
|
@ -296,7 +296,7 @@ namespace euf {
|
|||
push_merge(mk_extract(arg, 0, w - 1), arg);
|
||||
ensure_slice(arg, lo, hi);
|
||||
}
|
||||
TRACE("bv", tout << "done register " << g.bpp(n) << "\n");
|
||||
TRACE(bv, tout << "done register " << g.bpp(n) << "\n");
|
||||
}
|
||||
|
||||
//
|
||||
|
|
@ -306,7 +306,7 @@ namespace euf {
|
|||
enode* r = n;
|
||||
unsigned lb = 0, ub = width(n) - 1;
|
||||
while (true) {
|
||||
TRACE("bv", tout << "ensure slice " << g.bpp(n) << " " << lb << " [" << lo << ", " << hi << "] " << ub << "\n");
|
||||
TRACE(bv, tout << "ensure slice " << g.bpp(n) << " " << lb << " [" << lo << ", " << hi << "] " << ub << "\n");
|
||||
SASSERT(lb <= lo && hi <= ub);
|
||||
SASSERT(ub - lb + 1 == width(r));
|
||||
if (lb == lo && ub == hi)
|
||||
|
|
@ -370,7 +370,7 @@ namespace euf {
|
|||
SASSERT(!ys.empty());
|
||||
auto x = xs.back();
|
||||
auto y = ys.back();
|
||||
TRACE("bv", tout << "merge " << g.bpp(x) << " " << g.bpp(y) << "\n");
|
||||
TRACE(bv, tout << "merge " << g.bpp(x) << " " << g.bpp(y) << "\n");
|
||||
if (unfold_sub(x, xs))
|
||||
continue;
|
||||
else if (unfold_sub(y, ys))
|
||||
|
|
@ -407,7 +407,7 @@ namespace euf {
|
|||
}
|
||||
|
||||
void bv_plugin::split(enode* n, unsigned cut) {
|
||||
TRACE("bv", tout << "split: " << g.bpp(n) << " " << cut << "\n");
|
||||
TRACE(bv, tout << "split: " << g.bpp(n) << " " << cut << "\n");
|
||||
unsigned w = width(n);
|
||||
SASSERT(!info(n).hi);
|
||||
SASSERT(0 < cut && cut < w);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue