mirror of
https://github.com/Z3Prover/z3
synced 2026-01-08 20:11:17 +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
|
|
@ -31,7 +31,7 @@ expr_ref var_subst::operator()(expr * n, unsigned num_args, expr * const * args)
|
|||
result = n;
|
||||
//application does not have free variables or nested quantifiers.
|
||||
//There is no need to print the bindings here?
|
||||
SCTRACE("bindings", is_trace_enabled("coming_from_quant"),
|
||||
SCTRACE(bindings, is_trace_enabled(TraceTag::coming_from_quant),
|
||||
tout << "(ground)\n";
|
||||
for (unsigned i = 0; i < num_args; i++) {
|
||||
if (args[i]) {
|
||||
|
|
@ -78,7 +78,7 @@ expr_ref var_subst::operator()(expr * n, unsigned num_args, expr * const * args)
|
|||
m_reducer.set_bindings(num_args, args);
|
||||
m_reducer(n, result);
|
||||
SASSERT(is_well_sorted(m, result));
|
||||
TRACE("var_subst_bug",
|
||||
TRACE(var_subst_bug,
|
||||
tout << "m_std_order: " << m_std_order << "\n" << mk_ismt2_pp(n, m) << "\nusing\n";
|
||||
for (unsigned i = 0; i < num_args; i++) tout << mk_ismt2_pp(args[i], m) << "\n";
|
||||
tout << "\n------>\n";
|
||||
|
|
@ -95,7 +95,7 @@ unused_vars_eliminator::unused_vars_eliminator(ast_manager & m, params_ref const
|
|||
expr_ref unused_vars_eliminator::operator()(quantifier* q) {
|
||||
expr_ref result(m);
|
||||
SASSERT(is_well_sorted(m, q));
|
||||
TRACE("elim_unused_vars", tout << expr_ref(q, m) << "\n";);
|
||||
TRACE(elim_unused_vars, tout << expr_ref(q, m) << "\n";);
|
||||
if (is_lambda(q)) {
|
||||
result = q;
|
||||
return result;
|
||||
|
|
@ -207,7 +207,7 @@ expr_ref unused_vars_eliminator::operator()(quantifier* q) {
|
|||
expr_ref elim_unused_vars(ast_manager & m, quantifier * q, params_ref const & params) {
|
||||
unused_vars_eliminator el(m, params);
|
||||
expr_ref result = el(q);
|
||||
TRACE("elim_unused_vars", tout << expr_ref(q, m) << " -> " << result << "\n";);
|
||||
TRACE(elim_unused_vars, tout << expr_ref(q, m) << " -> " << result << "\n";);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -215,11 +215,11 @@ expr_ref instantiate(ast_manager & m, quantifier * q, expr * const * exprs) {
|
|||
var_subst subst(m);
|
||||
expr_ref new_expr(m), result(m);
|
||||
new_expr = subst(q->get_expr(), q->get_num_decls(), exprs);
|
||||
TRACE("var_subst", tout << mk_pp(q, m) << "\n" << new_expr << "\n";);
|
||||
TRACE(var_subst, tout << mk_pp(q, m) << "\n" << new_expr << "\n";);
|
||||
inv_var_shifter shift(m);
|
||||
shift(new_expr, q->get_num_decls(), result);
|
||||
SASSERT(is_well_sorted(m, result));
|
||||
TRACE("instantiate_bug", tout << mk_ismt2_pp(q, m) << "\nusing\n";
|
||||
TRACE(instantiate_bug, tout << mk_ismt2_pp(q, m) << "\nusing\n";
|
||||
for (unsigned i = 0; i < q->get_num_decls(); i++) tout << mk_ismt2_pp(exprs[i], m) << "\n";
|
||||
tout << "\n----->\n" << mk_ismt2_pp(result, m) << "\n";);
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue