mirror of
https://github.com/Z3Prover/z3
synced 2025-06-27 00:18:45 +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
|
@ -50,7 +50,7 @@ public:
|
|||
|
||||
void operator()() {
|
||||
get_points();
|
||||
TRACE("nla_solver", print_tangent_domain(tout << "tang domain = ") << std::endl;);
|
||||
TRACE(nla_solver, print_tangent_domain(tout << "tang domain = ") << std::endl;);
|
||||
generate_line1();
|
||||
generate_line2();
|
||||
generate_plane(m_a);
|
||||
|
@ -113,7 +113,7 @@ private:
|
|||
rational delta = rational(1);
|
||||
if (!all_ints )
|
||||
delta = std::min(delta, abs(m_correct_v - m_v));
|
||||
TRACE("nla_solver", tout << "delta = " << delta << "\n";);
|
||||
TRACE(nla_solver, tout << "delta = " << delta << "\n";);
|
||||
if (!m_below){
|
||||
m_a = point(x - delta, y + delta);
|
||||
m_b = point(x + delta, y - delta);
|
||||
|
@ -140,9 +140,9 @@ private:
|
|||
while (steps-- && !c().done()) {
|
||||
del *= rational(2);
|
||||
point na = m_xy + del;
|
||||
TRACE("nla_solver_tp", tout << "del = " << del << std::endl;);
|
||||
TRACE(nla_solver_tp, tout << "del = " << del << std::endl;);
|
||||
if (!plane_is_correct_cut(na)) {
|
||||
TRACE("nla_solver_tp", tout << "exit\n";);
|
||||
TRACE(nla_solver_tp, tout << "exit\n";);
|
||||
return;
|
||||
}
|
||||
a = na;
|
||||
|
@ -155,11 +155,11 @@ private:
|
|||
|
||||
void get_points() {
|
||||
get_initial_points();
|
||||
TRACE("nla_solver", tout << "xy = " << m_xy << ", correct val = " << m_correct_v;
|
||||
TRACE(nla_solver, tout << "xy = " << m_xy << ", correct val = " << m_correct_v;
|
||||
print_tangent_domain(tout << "\ntang points:") << std::endl;);
|
||||
push_point(m_a);
|
||||
push_point(m_b);
|
||||
TRACE("nla_solver",
|
||||
TRACE(nla_solver,
|
||||
tout << "pushed a = " << m_a << std::endl
|
||||
<< "pushed b = " << m_b << std::endl
|
||||
<< "tang_plane(a) = " << tang_plane(m_a) << " , val = " << m_a << ", "
|
||||
|
@ -171,7 +171,7 @@ private:
|
|||
}
|
||||
|
||||
bool plane_is_correct_cut(const point& plane) const {
|
||||
TRACE("nla_solver", tout << "plane = " << plane << "\n";
|
||||
TRACE(nla_solver, tout << "plane = " << plane << "\n";
|
||||
tout << "tang_plane() = " << tang_plane(plane) << ", v = " << m_v << ", correct_v = " << m_correct_v << "\n";);
|
||||
SASSERT((m_below && m_v < m_correct_v) ||
|
||||
((!m_below) && m_v > m_correct_v));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue