mirror of
https://github.com/Z3Prover/z3
synced 2025-11-13 01:21:14 +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
|
|
@ -411,7 +411,7 @@ namespace datalog {
|
|||
}
|
||||
|
||||
void check_relation_plugin::check_equiv(char const* objective, expr* fml1, expr* fml2) {
|
||||
TRACE("doc", tout << mk_pp(fml1, m) << "\n";
|
||||
TRACE(doc, tout << mk_pp(fml1, m) << "\n";
|
||||
tout << mk_pp(fml2, m) << "\n";);
|
||||
smt_params fp;
|
||||
smt::kernel solver(m, fp);
|
||||
|
|
@ -486,7 +486,7 @@ namespace datalog {
|
|||
union_fn(relation_union_fn* m): m_union(m) {}
|
||||
|
||||
void operator()(relation_base & _r, const relation_base & _src, relation_base * _delta) override {
|
||||
TRACE("doc", _r.display(tout << "dst:\n"); _src.display(tout << "src:\n"););
|
||||
TRACE(doc, _r.display(tout << "dst:\n"); _src.display(tout << "src:\n"););
|
||||
check_relation& r = get(_r);
|
||||
check_relation const& src = get(_src);
|
||||
check_relation* d = get(_delta);
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ namespace datalog {
|
|||
m_is_widen(is_widen) {
|
||||
}
|
||||
void operator()(relation_base & _r, const relation_base & _src, relation_base * _delta) override {
|
||||
TRACE("bound_relation", _r.display(tout << "dst:\n"); _src.display(tout << "src:\n"););
|
||||
TRACE(bound_relation, _r.display(tout << "dst:\n"); _src.display(tout << "src:\n"););
|
||||
get(_r).mk_union(get(_src), get(_delta), m_is_widen);
|
||||
}
|
||||
};
|
||||
|
|
@ -161,9 +161,9 @@ namespace datalog {
|
|||
m_is_widen(is_widen) {
|
||||
}
|
||||
void operator()(relation_base & _r, const relation_base & _src, relation_base * _delta) override {
|
||||
TRACE("bound_relation", _r.display(tout << "dst:\n"); _src.display(tout << "src:\n"););
|
||||
TRACE(bound_relation, _r.display(tout << "dst:\n"); _src.display(tout << "src:\n"););
|
||||
get(_r).mk_union_i(get_interval_relation(_src), get(_delta), m_is_widen);
|
||||
TRACE("bound_relation", _r.display(tout << "dst':\n"););
|
||||
TRACE(bound_relation, _r.display(tout << "dst':\n"););
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -343,7 +343,7 @@ namespace datalog {
|
|||
//
|
||||
|
||||
void operator()(relation_base& t) override {
|
||||
TRACE("dl", tout << mk_pp(m_cond, m_cond.get_manager()) << "\n"; t.display(tout););
|
||||
TRACE(dl, tout << mk_pp(m_cond, m_cond.get_manager()) << "\n"; t.display(tout););
|
||||
bound_relation& r = get(t);
|
||||
switch(m_kind) {
|
||||
case K_FALSE:
|
||||
|
|
@ -367,7 +367,7 @@ namespace datalog {
|
|||
UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
TRACE("dl", t.display(tout << "result\n"););
|
||||
TRACE(dl, t.display(tout << "result\n"););
|
||||
}
|
||||
|
||||
bool supports_attachment(relation_base& t) override {
|
||||
|
|
@ -401,7 +401,7 @@ namespace datalog {
|
|||
for (; it != end; ++it) {
|
||||
lev.push_back(renaming[*it]);
|
||||
}
|
||||
TRACE("dl",
|
||||
TRACE(dl,
|
||||
tout << "project: ";
|
||||
for (unsigned i = 0; i < renaming.size(); ++i)
|
||||
if (renaming[i] == UINT_MAX) tout << i << " ";
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ namespace datalog {
|
|||
void compiler::make_add_unbound_column(rule* compiled_rule, unsigned col_idx, func_decl* pred, reg_idx src, const relation_sort& s, reg_idx & result,
|
||||
bool & dealloc, instruction_block & acc) {
|
||||
|
||||
TRACE("dl", tout << "Adding unbound column " << mk_pp(pred, m_context.get_manager())
|
||||
TRACE(dl, tout << "Adding unbound column " << mk_pp(pred, m_context.get_manager())
|
||||
<< " " << m_context.get_rel_context()->get_rmanager().to_nice_string(s) << "\n";);
|
||||
IF_VERBOSE(3, {
|
||||
expr_ref e(m_context.get_manager());
|
||||
|
|
@ -219,7 +219,7 @@ namespace datalog {
|
|||
void compiler::make_full_relation(func_decl* pred, const relation_signature & sig, reg_idx & result,
|
||||
instruction_block & acc) {
|
||||
SASSERT(sig.empty());
|
||||
TRACE("dl", tout << "Adding unbound column " << mk_pp(pred, m_context.get_manager()) << "\n";);
|
||||
TRACE(dl, tout << "Adding unbound column " << mk_pp(pred, m_context.get_manager()) << "\n";);
|
||||
if (m_empty_tables_registers.find(pred, result))
|
||||
return;
|
||||
|
||||
|
|
@ -271,7 +271,7 @@ namespace datalog {
|
|||
bool & dealloc,
|
||||
instruction_block & acc) {
|
||||
|
||||
TRACE("dl", tout << mk_pp(head_pred, m_context.get_manager()) << "\n";);
|
||||
TRACE(dl, tout << mk_pp(head_pred, m_context.get_manager()) << "\n";);
|
||||
|
||||
unsigned col_cnt = acis0.size();
|
||||
reg_idx curr = src;
|
||||
|
|
@ -337,7 +337,7 @@ namespace datalog {
|
|||
}
|
||||
else {
|
||||
SASSERT(acis[i].kind==ACK_UNBOUND_VAR);
|
||||
TRACE("dl", tout << head_pred->get_name() << " index: " << i
|
||||
TRACE(dl, tout << head_pred->get_name() << " index: " << i
|
||||
<< " " << m_context.get_rel_context()->get_rmanager().to_nice_string(acis[i].domain) << "\n";);
|
||||
make_add_unbound_column(compiled_rule, i, head_pred, curr, acis[i].domain, curr, dealloc, acc);
|
||||
handled_unbound.insert(acis[i].var_index,bound_column_index);
|
||||
|
|
@ -456,7 +456,7 @@ namespace datalog {
|
|||
unsigned head_len = h->get_num_args();
|
||||
func_decl * head_pred = h->get_decl();
|
||||
|
||||
TRACE("dl", r->display(m_context, tout); );
|
||||
TRACE(dl, r->display(m_context, tout); );
|
||||
|
||||
unsigned pt_len = r->get_positive_tail_size();
|
||||
SASSERT(pt_len<=2); //we require rules to be processed by the mk_simple_joins rule transformer plugin
|
||||
|
|
@ -625,7 +625,7 @@ namespace datalog {
|
|||
} else {
|
||||
// we have an unbound variable, so we add an unbound column for it
|
||||
relation_sort unbound_sort = m_free_vars[v];
|
||||
TRACE("dl", tout << "unbound: " << v << "\n" << filter_cond << " " << mk_pp(unbound_sort, m) << "\n";);
|
||||
TRACE(dl, tout << "unbound: " << v << "\n" << filter_cond << " " << mk_pp(unbound_sort, m) << "\n";);
|
||||
make_add_unbound_column(r, 0, head_pred, filtered_res, unbound_sort, filtered_res, dealloc, acc);
|
||||
|
||||
src_col = single_res_expr.size();
|
||||
|
|
@ -778,7 +778,7 @@ namespace datalog {
|
|||
relation_sort unbound_sort = m_free_vars[v];
|
||||
|
||||
reg_idx new_reg;
|
||||
TRACE("dl", tout << mk_pp(head_pred, m_context.get_manager()) << "\n";);
|
||||
TRACE(dl, tout << mk_pp(head_pred, m_context.get_manager()) << "\n";);
|
||||
bool new_dealloc;
|
||||
make_add_unbound_column(r, 0, head_pred, filtered_res, unbound_sort, new_reg, new_dealloc, acc);
|
||||
|
||||
|
|
@ -902,7 +902,7 @@ namespace datalog {
|
|||
if (!pos_vars.contains(v)) {
|
||||
single_res_expr.push_back(e);
|
||||
make_add_unbound_column(r, v, pred, single_res, e->get_sort(), single_res, dealloc, acc);
|
||||
TRACE("dl", tout << "Adding unbound column: " << mk_pp(e, m_context.get_manager()) << "\n";);
|
||||
TRACE(dl, tout << "Adding unbound column: " << mk_pp(e, m_context.get_manager()) << "\n";);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1268,7 +1268,7 @@ namespace datalog {
|
|||
continue;
|
||||
}
|
||||
|
||||
TRACE("dl",
|
||||
TRACE(dl,
|
||||
tout << "Stratum: ";
|
||||
func_decl_set::iterator pit = strat_preds.begin();
|
||||
func_decl_set::iterator pend = strat_preds.end();
|
||||
|
|
@ -1332,7 +1332,7 @@ namespace datalog {
|
|||
|
||||
acc.set_observer(nullptr);
|
||||
|
||||
TRACE("dl", execution_code.display(execution_context(m_context), tout););
|
||||
TRACE(dl, execution_code.display(execution_context(m_context), tout););
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -320,16 +320,16 @@ namespace datalog {
|
|||
}
|
||||
bool perform(execution_context & ctx) override {
|
||||
log_verbose(ctx);
|
||||
TRACE("dl", tout << "loop entered\n";);
|
||||
TRACE(dl, tout << "loop entered\n";);
|
||||
unsigned count = 0;
|
||||
while (!control_is_empty(ctx)) {
|
||||
IF_VERBOSE(10, verbose_stream() << "looping ... " << count++ << "\n";);
|
||||
if (!m_body->perform(ctx)) {
|
||||
TRACE("dl", tout << "while loop terminated before completion\n";);
|
||||
TRACE(dl, tout << "while loop terminated before completion\n";);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
TRACE("dl", tout << "while loop exited\n";);
|
||||
TRACE(dl, tout << "while loop exited\n";);
|
||||
return true;
|
||||
}
|
||||
void make_annotations(execution_context & ctx) override {
|
||||
|
|
@ -383,7 +383,7 @@ namespace datalog {
|
|||
store_fn(r1, r2, fn);
|
||||
}
|
||||
|
||||
TRACE("dl",
|
||||
TRACE(dl,
|
||||
r1.get_signature().output(ctx.get_rel_context().get_manager(), tout);
|
||||
tout<<":"<<r1.get_size_estimate_rows()<<" x ";
|
||||
r2.get_signature().output(ctx.get_rel_context().get_manager(), tout);
|
||||
|
|
@ -391,7 +391,7 @@ namespace datalog {
|
|||
|
||||
ctx.set_reg(m_res, (*fn)(r1, r2));
|
||||
|
||||
TRACE("dl",
|
||||
TRACE(dl,
|
||||
ctx.reg(m_res)->get_signature().output(ctx.get_rel_context().get_manager(), tout);
|
||||
tout<<":"<<ctx.reg(m_res)->get_size_estimate_rows()<<"\n";);
|
||||
|
||||
|
|
@ -531,7 +531,7 @@ namespace datalog {
|
|||
|
||||
relation_mutator_fn * fn;
|
||||
relation_base & r = *ctx.reg(m_reg);
|
||||
TRACE("dl_verbose", r.display(tout <<"pre-filter-interpreted:\n"););
|
||||
TRACE(dl_verbose, r.display(tout <<"pre-filter-interpreted:\n"););
|
||||
if (!find_fn(r, fn)) {
|
||||
fn = r.get_manager().mk_filter_interpreted_fn(r, m_cond);
|
||||
if (!fn) {
|
||||
|
|
@ -546,7 +546,7 @@ namespace datalog {
|
|||
if (r.fast_empty()) {
|
||||
ctx.make_empty(m_reg);
|
||||
}
|
||||
//TRACE("dl_verbose", r.display(tout <<"post-filter-interpreted:\n"););
|
||||
//TRACE(dl_verbose, r.display(tout <<"post-filter-interpreted:\n"););
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -588,7 +588,7 @@ namespace datalog {
|
|||
|
||||
relation_transformer_fn * fn;
|
||||
relation_base & reg = *ctx.reg(m_src);
|
||||
TRACE("dl_verbose", reg.display(tout <<"pre-filter-interpreted-and-project:\n"););
|
||||
TRACE(dl_verbose, reg.display(tout <<"pre-filter-interpreted-and-project:\n"););
|
||||
if (!find_fn(reg, fn)) {
|
||||
fn = reg.get_manager().mk_filter_interpreted_and_project_fn(reg, m_cond, m_cols.size(), m_cols.data());
|
||||
if (!fn) {
|
||||
|
|
@ -604,7 +604,7 @@ namespace datalog {
|
|||
if (ctx.reg(m_res)->fast_empty()) {
|
||||
ctx.make_empty(m_res);
|
||||
}
|
||||
// TRACE("dl_verbose", reg.display(tout << "post-filter-interpreted-and-project:\n"););
|
||||
// TRACE(dl_verbose, reg.display(tout << "post-filter-interpreted-and-project:\n"););
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -640,7 +640,7 @@ namespace datalog {
|
|||
instr_union(reg_idx src, reg_idx tgt, reg_idx delta, bool widen)
|
||||
: m_src(src), m_tgt(tgt), m_delta(delta), m_widen(widen) {}
|
||||
bool perform(execution_context & ctx) override {
|
||||
TRACE("dl", tout << "union " << m_src << " into " << m_tgt
|
||||
TRACE(dl, tout << "union " << m_src << " into " << m_tgt
|
||||
<< " " << ctx.reg(m_src) << " " << ctx.reg(m_tgt) << "\n";);
|
||||
if (!ctx.reg(m_src)) {
|
||||
return true;
|
||||
|
|
@ -699,11 +699,11 @@ namespace datalog {
|
|||
}
|
||||
|
||||
SASSERT(r_src.get_signature().size() == r_tgt.get_signature().size());
|
||||
TRACE("dl_verbose", r_tgt.display(tout <<"pre-union:"););
|
||||
TRACE(dl_verbose, r_tgt.display(tout <<"pre-union:"););
|
||||
|
||||
(*fn)(r_tgt, r_src, r_delta);
|
||||
|
||||
TRACE("dl_verbose",
|
||||
TRACE(dl_verbose,
|
||||
r_src.display(tout <<"src:");
|
||||
r_tgt.display(tout <<"post-union:");
|
||||
if (r_delta) {
|
||||
|
|
@ -841,9 +841,9 @@ namespace datalog {
|
|||
}
|
||||
store_fn(r1, r2, fn);
|
||||
}
|
||||
TRACE("dl", tout<<r1.get_size_estimate_rows()<<" x "<<r2.get_size_estimate_rows()<<" jp->\n";);
|
||||
TRACE(dl, tout<<r1.get_size_estimate_rows()<<" x "<<r2.get_size_estimate_rows()<<" jp->\n";);
|
||||
ctx.set_reg(m_res, (*fn)(r1, r2));
|
||||
TRACE("dl", tout<<ctx.reg(m_res)->get_size_estimate_rows()<<"\n";);
|
||||
TRACE(dl, tout<<ctx.reg(m_res)->get_size_estimate_rows()<<"\n";);
|
||||
if (ctx.reg(m_res)->fast_empty()) {
|
||||
ctx.make_empty(m_res);
|
||||
}
|
||||
|
|
@ -893,7 +893,7 @@ namespace datalog {
|
|||
unsigned col, reg_idx result)
|
||||
: m_src(src), m_result(result), m_value(value, m), m_col(col) {
|
||||
// [Leo]: does not compile on gcc
|
||||
// TRACE("dl", tout << "src:" << m_src << " result: " << m_result << " value:" << m_value << " column:" << m_col << "\n";);
|
||||
// TRACE(dl, tout << "src:" << m_src << " result: " << m_result << " value:" << m_value << " column:" << m_col << "\n";);
|
||||
}
|
||||
|
||||
bool perform(execution_context & ctx) override {
|
||||
|
|
@ -1140,7 +1140,7 @@ namespace datalog {
|
|||
for (instruction * instr : m_data) {
|
||||
crec.start(instr); //finish is performed by the next start() or by the destructor of crec
|
||||
|
||||
TRACE("dl", instr->display_head_impl(ctx, tout << "% ") << "\n";);
|
||||
TRACE(dl, instr->display_head_impl(ctx, tout << "% ") << "\n";);
|
||||
|
||||
if (ctx.should_terminate() || !instr->perform(ctx)) {
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ namespace datalog {
|
|||
|
||||
void operator()(relation_base & _r, const relation_base & _src, relation_base * _delta) override {
|
||||
|
||||
TRACE("interval_relation", _r.display(tout << "dst:\n"); _src.display(tout << "src:\n"););
|
||||
TRACE(interval_relation, _r.display(tout << "dst:\n"); _src.display(tout << "src:\n"););
|
||||
|
||||
interval_relation& r = get(_r);
|
||||
interval_relation const& src = get(_src);
|
||||
|
|
@ -270,7 +270,7 @@ namespace datalog {
|
|||
interval_relation & r = get(_r);
|
||||
interval_relation_plugin & p = r.get_plugin();
|
||||
r.mk_intersect(m_col, interval(p.dep(), m_value));
|
||||
TRACE("interval_relation", tout << m_value << "\n"; r.display(tout););
|
||||
TRACE(interval_relation, tout << m_value << "\n"; r.display(tout););
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -292,7 +292,7 @@ namespace datalog {
|
|||
|
||||
void operator()(relation_base& t) override {
|
||||
get(t).filter_interpreted(m_cond);
|
||||
TRACE("interval_relation", tout << mk_pp(m_cond, m_cond.get_manager()) << "\n"; t.display(tout););
|
||||
TRACE(interval_relation, tout << mk_pp(m_cond, m_cond.get_manager()) << "\n"; t.display(tout););
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -317,7 +317,7 @@ namespace datalog {
|
|||
interval_relation::interval_relation(interval_relation_plugin& p, relation_signature const& s, bool is_empty):
|
||||
vector_relation<interval>(p, s, is_empty, interval(p.dep()))
|
||||
{
|
||||
TRACE("interval_relation", tout << s.size() << "\n";);
|
||||
TRACE(interval_relation, tout << s.size() << "\n";);
|
||||
}
|
||||
|
||||
void interval_relation::add_fact(const relation_fact & f) {
|
||||
|
|
|
|||
|
|
@ -482,12 +482,12 @@ namespace datalog {
|
|||
relation_mutator_fn * explanation_relation_plugin::mk_filter_interpreted_fn(const relation_base & r,
|
||||
app * cond) {
|
||||
if (&r.get_plugin() != this) {
|
||||
TRACE("dl", tout << "not same plugin\n";);
|
||||
TRACE(dl, tout << "not same plugin\n";);
|
||||
return nullptr;
|
||||
}
|
||||
ast_manager & m = get_ast_manager();
|
||||
if (!m.is_eq(cond)) {
|
||||
TRACE("dl", tout << "not equality " << mk_pp(cond, m) << "\n";);
|
||||
TRACE(dl, tout << "not equality " << mk_pp(cond, m) << "\n";);
|
||||
return nullptr;
|
||||
}
|
||||
expr * arg1 = cond->get_arg(0);
|
||||
|
|
@ -498,13 +498,13 @@ namespace datalog {
|
|||
}
|
||||
|
||||
if (!is_var(arg1) || !is_app(arg2)) {
|
||||
TRACE("dl", tout << "not variable assignemnt\n";);
|
||||
TRACE(dl, tout << "not variable assignemnt\n";);
|
||||
return nullptr;
|
||||
}
|
||||
var * col_var = to_var(arg1);
|
||||
app * new_rule = to_app(arg2);
|
||||
if (!get_context().get_decl_util().is_rule_sort(col_var->get_sort())) {
|
||||
TRACE("dl", tout << "not rule sort\n";);
|
||||
TRACE(dl, tout << "not rule sort\n";);
|
||||
return nullptr;
|
||||
}
|
||||
unsigned col_idx = col_var->get_idx();
|
||||
|
|
@ -839,7 +839,7 @@ namespace datalog {
|
|||
}
|
||||
func_decl_set predicates(m_context.get_predicates());
|
||||
for (func_decl* orig_decl : predicates) {
|
||||
TRACE("dl", tout << mk_pp(orig_decl, m_manager) << "\n";);
|
||||
TRACE(dl, tout << mk_pp(orig_decl, m_manager) << "\n";);
|
||||
func_decl * e_decl = get_e_decl(orig_decl);
|
||||
|
||||
if (!rmgr.try_get_relation(orig_decl) &&
|
||||
|
|
@ -861,10 +861,10 @@ namespace datalog {
|
|||
scoped_ptr<relation_join_fn> product_fun = rmgr.mk_join_fn(orig_rel, *m_e_fact_relation, 0, nullptr, nullptr);
|
||||
SASSERT(product_fun);
|
||||
scoped_rel<relation_base> aux_extended_rel = (*product_fun)(orig_rel, *m_e_fact_relation);
|
||||
TRACE("dl", tout << aux_extended_rel << " " << aux_extended_rel->get_plugin().get_name() << "\n";
|
||||
TRACE(dl, tout << aux_extended_rel << " " << aux_extended_rel->get_plugin().get_name() << "\n";
|
||||
tout << e_rel.get_plugin().get_name() << "\n";);
|
||||
scoped_ptr<relation_union_fn> union_fun = rmgr.mk_union_fn(e_rel, *aux_extended_rel);
|
||||
TRACE("dl", tout << union_fun << "\n";);
|
||||
TRACE(dl, tout << union_fun << "\n";);
|
||||
SASSERT(union_fun);
|
||||
(*union_fun)(e_rel, *aux_extended_rel);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ namespace datalog {
|
|||
m_stratified = (head_stratum > m_src_stratum);
|
||||
}
|
||||
idx_set_union(m_all_nonlocal_vars, non_local_vars_normalized);
|
||||
TRACE("dl", tout << "all-nonlocal: " << m_all_nonlocal_vars << "\n";);
|
||||
TRACE(dl, tout << "all-nonlocal: " << m_all_nonlocal_vars << "\n";);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -243,7 +243,7 @@ namespace datalog {
|
|||
|
||||
m_pinned.push_back(t1n);
|
||||
m_pinned.push_back(t2n);
|
||||
TRACE("dl_verbose", tout << mk_pp(t1, m) << " " << mk_pp(t2, m) << " |-> " << t1n_ref << " " << t2n_ref << "\n";);
|
||||
TRACE(dl_verbose, tout << mk_pp(t1, m) << " " << mk_pp(t2, m) << " |-> " << t1n_ref << " " << t2n_ref << "\n";);
|
||||
|
||||
return app_pair(t1n, t2n);
|
||||
}
|
||||
|
|
@ -271,7 +271,7 @@ namespace datalog {
|
|||
}
|
||||
|
||||
inf.add_rule(*this, t1, t2, r, normalized_vars, non_local_vars);
|
||||
TRACE("dl", tout << mk_pp(t1, m) << " " << mk_pp(t2, m) << " ";
|
||||
TRACE(dl, tout << mk_pp(t1, m) << " " << mk_pp(t2, m) << " ";
|
||||
tout << non_local_vars << "\n";
|
||||
r->display(m_context, tout);
|
||||
if (inf.can_be_joined()) tout << "cost: " << inf.get_cost() << "\n";);
|
||||
|
|
@ -290,11 +290,11 @@ namespace datalog {
|
|||
void register_rule(rule * r) {
|
||||
rule_counter counter;
|
||||
counter.count_rule_vars(r, 1);
|
||||
TRACE("dl", tout << "counter: "; for (auto const& kv: counter) tout << kv.m_key << ": " << kv.m_value << " "; tout << "\n";);
|
||||
TRACE(dl, tout << "counter: "; for (auto const& kv: counter) tout << kv.m_key << ": " << kv.m_value << " "; tout << "\n";);
|
||||
ptr_vector<app> & rule_content = m_rules_content.insert_if_not_there(r, ptr_vector<app>());
|
||||
SASSERT(rule_content.empty());
|
||||
|
||||
TRACE("dl", r->display(m_context, tout << "register "););
|
||||
TRACE(dl, r->display(m_context, tout << "register "););
|
||||
|
||||
unsigned pos_tail_size = r->get_positive_tail_size();
|
||||
for (unsigned i = 0; i < pos_tail_size; i++) {
|
||||
|
|
@ -319,7 +319,7 @@ namespace datalog {
|
|||
counter.collect_positive(non_local_vars);
|
||||
counter.count_vars(t2, 1); //restore t2 variables in counter
|
||||
set_intersection(non_local_vars, t2_vars);
|
||||
TRACE("dl", tout << "non-local vars: " << non_local_vars << "\n";);
|
||||
TRACE(dl, tout << "non-local vars: " << non_local_vars << "\n";);
|
||||
register_pair(t1, t2, r, non_local_vars);
|
||||
}
|
||||
counter.count_vars(t1, 1); //restore t1 variables in counter
|
||||
|
|
@ -356,7 +356,7 @@ namespace datalog {
|
|||
}
|
||||
SASSERT(found);
|
||||
}
|
||||
TRACE("dl",
|
||||
TRACE(dl,
|
||||
tout << mk_pp(t1, m) << " " << mk_pp(t2, m) << " arity: " << arity << "\n";
|
||||
tout << "output: " << output_vars << "\n";
|
||||
tout << "args: " << args << "\n";);
|
||||
|
|
@ -412,7 +412,7 @@ namespace datalog {
|
|||
unsigned len = rule_content.size();
|
||||
unsigned original_len = len+removed_tails.size()-added_tails0.size();
|
||||
app_ref_vector added_tails(added_tails0); //we need a copy since we'll be modifying it
|
||||
TRACE("dl", tout << added_tails << "\n";);
|
||||
TRACE(dl, tout << added_tails << "\n";);
|
||||
|
||||
unsigned rt_sz = removed_tails.size();
|
||||
//remove edges between removed tails
|
||||
|
|
@ -456,7 +456,7 @@ namespace datalog {
|
|||
while (!added_tails.empty()) {
|
||||
app * a_tail = added_tails.back(); //added tail
|
||||
|
||||
TRACE("dl", tout << "replace edges " << mk_pp(a_tail, m) << "\n";);
|
||||
TRACE(dl, tout << "replace edges " << mk_pp(a_tail, m) << "\n";);
|
||||
|
||||
var_idx_set a_tail_vars = rm.collect_vars(a_tail);
|
||||
counter.count_vars(a_tail, -1); //temporarily remove a_tail variables from counter
|
||||
|
|
@ -491,7 +491,7 @@ namespace datalog {
|
|||
if (len == 1) {
|
||||
return;
|
||||
}
|
||||
TRACE("dl",
|
||||
TRACE(dl,
|
||||
tout << "pair: " << mk_pp(t1, m) << " " << mk_pp(t2, m) << "\n";
|
||||
tout << mk_pp(t_new, m) << "\n";
|
||||
tout << "all-non-local: " << m_costs[pair_key]->m_all_nonlocal_vars << "\n";
|
||||
|
|
@ -531,7 +531,7 @@ namespace datalog {
|
|||
reverse_renaming(normalizer, denormalizer);
|
||||
expr_ref new_transf(m);
|
||||
new_transf = m_var_subst(t_new, denormalizer);
|
||||
TRACE("dl", tout << mk_pp(rt1, m) << " " << mk_pp(rt2, m) << " -> " << new_transf << "\n";);
|
||||
TRACE(dl, tout << mk_pp(rt1, m) << " " << mk_pp(rt2, m) << " -> " << new_transf << "\n";);
|
||||
counter.count_vars(rt2, -1);
|
||||
var_idx_set rt2_vars = rm.collect_vars(rt2);
|
||||
var_idx_set tr_vars = rm.collect_vars(new_transf);
|
||||
|
|
@ -541,14 +541,14 @@ namespace datalog {
|
|||
set_intersection(non_local_vars, rt2_vars);
|
||||
counter.count_vars(rt2, +1);
|
||||
// require that tr_vars contains non_local_vars
|
||||
TRACE("dl", tout << "non-local : " << non_local_vars << " tr_vars " << tr_vars << " rt12_vars " << rt2_vars << "\n";);
|
||||
TRACE(dl, tout << "non-local : " << non_local_vars << " tr_vars " << tr_vars << " rt12_vars " << rt2_vars << "\n";);
|
||||
if (!non_local_vars.subset_of(tr_vars)) {
|
||||
var_ref_vector normalizer2 = get_normalizer(rt2, rt1);
|
||||
TRACE("dl", tout << normalizer << "\nnorm\n" << normalizer2 << "\n";);
|
||||
TRACE(dl, tout << normalizer << "\nnorm\n" << normalizer2 << "\n";);
|
||||
denormalizer.reset();
|
||||
reverse_renaming(normalizer2, denormalizer);
|
||||
new_transf = m_var_subst(t_new, denormalizer);
|
||||
TRACE("dl", tout << mk_pp(rt2, m) << " " << mk_pp(rt1, m) << " -> " << new_transf << "\n";);
|
||||
TRACE(dl, tout << mk_pp(rt2, m) << " " << mk_pp(rt1, m) << " -> " << new_transf << "\n";);
|
||||
SASSERT(non_local_vars.subset_of(rm.collect_vars(new_transf)));
|
||||
}
|
||||
app * new_lit = to_app(new_transf);
|
||||
|
|
@ -585,7 +585,7 @@ namespace datalog {
|
|||
SASSERT(!removed_tails.empty());
|
||||
SASSERT(!added_tails.empty());
|
||||
m_modified_rules = true;
|
||||
TRACE("dl", tout << "replace rule content\n";);
|
||||
TRACE(dl, tout << "replace rule content\n";);
|
||||
replace_edges(r, removed_tails, added_tails, rule_content);
|
||||
}
|
||||
|
||||
|
|
@ -661,7 +661,7 @@ namespace datalog {
|
|||
|
||||
cost res = (estimate_size(t1) * estimate_size(t2)) / inters_size;
|
||||
|
||||
TRACE("report_costs",
|
||||
TRACE(report_costs,
|
||||
display_predicate(m_context, t1, tout);
|
||||
display_predicate(m_context, t2, tout);
|
||||
tout << res << "\n";);
|
||||
|
|
|
|||
|
|
@ -450,7 +450,7 @@ namespace datalog {
|
|||
}
|
||||
|
||||
relation_base * operator()(const relation_base & _r1, const relation_base & _r2) override {
|
||||
TRACE("dl", _r1.display(tout); _r2.display(tout););
|
||||
TRACE(dl, _r1.display(tout); _r2.display(tout););
|
||||
ptr_vector<relation_base> relations;
|
||||
unsigned sz = m_joins.size();
|
||||
relation_base* result = nullptr;
|
||||
|
|
@ -460,7 +460,7 @@ namespace datalog {
|
|||
relations.push_back((*m_joins[i])(r1, r2));
|
||||
}
|
||||
result = alloc(product_relation, m_plugin, get_result_signature(), sz, relations.data());
|
||||
TRACE("dl",result->display(tout););
|
||||
TRACE(dl,result->display(tout););
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
|
@ -502,7 +502,7 @@ namespace datalog {
|
|||
relations.push_back((*m_transforms[i])(r[i]));
|
||||
}
|
||||
relation_base* result = alloc(product_relation, p, m_sig, relations.size(), relations.data());
|
||||
TRACE("dl", _r.display(tout); result->display(tout););
|
||||
TRACE(dl, _r.display(tout); result->display(tout););
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
|
@ -556,7 +556,7 @@ namespace datalog {
|
|||
else {
|
||||
u = rmgr.mk_union_fn(r1, r2, delta);
|
||||
}
|
||||
TRACE("dl_verbose", tout << r1.get_plugin().get_name() << " " << r2.get_plugin().get_name() << " " << (u?"found":"not found") << "\n";);
|
||||
TRACE(dl_verbose, tout << r1.get_plugin().get_name() << " " << r2.get_plugin().get_name() << " " << (u?"found":"not found") << "\n";);
|
||||
m_unions.back().push_back(u);
|
||||
}
|
||||
|
||||
|
|
@ -603,7 +603,7 @@ namespace datalog {
|
|||
scoped_ptr<relation_intersection_filter_fn> intersect_fun =
|
||||
m_rmgr.mk_filter_by_intersection_fn(tgt, src);
|
||||
if (!intersect_fun) {
|
||||
TRACE("dl", tgt.display(tout << "tgt\n"); src.display(tout << "src\n"););
|
||||
TRACE(dl, tgt.display(tout << "tgt\n"); src.display(tout << "src\n"););
|
||||
warning_msg("intersection does not exist");
|
||||
return;
|
||||
}
|
||||
|
|
@ -636,7 +636,7 @@ namespace datalog {
|
|||
}
|
||||
|
||||
void operator()(relation_base& _tgt, const relation_base& _src, relation_base* _delta) override {
|
||||
TRACE("dl", _tgt.display(tout << "dst:\n"); _src.display(tout << "src:\n"););
|
||||
TRACE(dl, _tgt.display(tout << "dst:\n"); _src.display(tout << "src:\n"););
|
||||
SASSERT(m_plugin.check_kind(_tgt));
|
||||
SASSERT(m_plugin.check_kind(_src));
|
||||
SASSERT(!_delta || m_plugin.check_kind(*_delta));
|
||||
|
|
@ -662,15 +662,15 @@ namespace datalog {
|
|||
continue; //this is the basic union which we will perform later
|
||||
}
|
||||
if (can_do_inner_union(i, j) && can_do_inner_union(j, i)) {
|
||||
TRACE("dl", itgt.display(tout << "tgt:\n"); src[j].display(tout << "src:\n"););
|
||||
TRACE(dl, itgt.display(tout << "tgt:\n"); src[j].display(tout << "src:\n"););
|
||||
// union[i][j]
|
||||
scoped_rel<relation_base> one_side_union = itgt.clone();
|
||||
scoped_rel<relation_base> one_side_delta = fresh_delta ? fresh_delta->clone() : nullptr;
|
||||
TRACE("dl", one_side_union->display(tout << "union 1:\n"); src[j].display(tout););
|
||||
TRACE(dl, one_side_union->display(tout << "union 1:\n"); src[j].display(tout););
|
||||
do_inner_union(i, j, *one_side_union, src[j], one_side_delta.get());
|
||||
TRACE("dl", one_side_union->display(tout << "union:\n"););
|
||||
TRACE(dl, one_side_union->display(tout << "union:\n"););
|
||||
do_destructive_intersection(side_result, one_side_union);
|
||||
TRACE("dl",
|
||||
TRACE(dl,
|
||||
side_result->display(tout << "inner-union: " << i << " " << j << "\n");
|
||||
itgt.display(tout << "tgt:\n"););
|
||||
if (one_side_delta) {
|
||||
|
|
@ -680,11 +680,11 @@ namespace datalog {
|
|||
// union[j][i]
|
||||
one_side_union = src[i].clone();
|
||||
one_side_delta = fresh_delta ? fresh_delta->clone() : nullptr;
|
||||
TRACE("dl", one_side_union->display(tout << "union 2:\n"); tgt[j].display(tout););
|
||||
TRACE(dl, one_side_union->display(tout << "union 2:\n"); tgt[j].display(tout););
|
||||
do_inner_union(i, j, *one_side_union, tgt[j], one_side_delta.get());
|
||||
TRACE("dl", one_side_union->display(tout << "union:\n"););
|
||||
TRACE(dl, one_side_union->display(tout << "union:\n"););
|
||||
do_destructive_intersection(side_result, one_side_union);
|
||||
TRACE("dl",
|
||||
TRACE(dl,
|
||||
side_result->display(tout << "inner-union: " << i << " " << j << "\n");
|
||||
itgt.display(tout << "tgt:\n"););
|
||||
if (one_side_delta) {
|
||||
|
|
@ -709,7 +709,7 @@ namespace datalog {
|
|||
|
||||
if (side_result) {
|
||||
do_intersection(itgt, *side_result);
|
||||
TRACE("dl", side_result->display(tout << "inner-union-end: " << i << "\n"););
|
||||
TRACE(dl, side_result->display(tout << "inner-union-end: " << i << "\n"););
|
||||
}
|
||||
if (fresh_delta) {
|
||||
do_destructive_intersection(fresh_delta,side_delta);
|
||||
|
|
@ -726,7 +726,7 @@ namespace datalog {
|
|||
}
|
||||
}
|
||||
}
|
||||
TRACE("dl", _tgt.display(tout << "dst':\n");
|
||||
TRACE(dl, _tgt.display(tout << "dst':\n");
|
||||
if (_delta) _delta->display(tout << "delta:\n"); ;);
|
||||
}
|
||||
};
|
||||
|
|
@ -749,7 +749,7 @@ namespace datalog {
|
|||
|
||||
|
||||
void operator()(relation_base& _tgt, const relation_base& _src, relation_base* _delta) override {
|
||||
TRACE("dl_verbose", _tgt.display(tout << "dst:\n"); _src.display(tout << "src:\n"););
|
||||
TRACE(dl_verbose, _tgt.display(tout << "dst:\n"); _src.display(tout << "src:\n"););
|
||||
product_relation& tgt = get(_tgt);
|
||||
product_relation const& src0 = get(_src);
|
||||
product_relation* delta = _delta ? get(_delta) : nullptr;
|
||||
|
|
@ -770,7 +770,7 @@ namespace datalog {
|
|||
SASSERT(m_aligned_union_fun);
|
||||
}
|
||||
(*m_aligned_union_fun)(tgt, src, delta);
|
||||
TRACE("dl", _tgt.display(tout << "dst':\n");
|
||||
TRACE(dl, _tgt.display(tout << "dst':\n");
|
||||
if (_delta) _delta->display(tout << "delta:\n"););
|
||||
}
|
||||
};
|
||||
|
|
@ -784,7 +784,7 @@ namespace datalog {
|
|||
m_inner_union_fun(inner_union_fun) {}
|
||||
|
||||
void operator()(relation_base& tgt, const relation_base& _src, relation_base* delta) override {
|
||||
TRACE("dl", tgt.display(tout); _src.display(tout); );
|
||||
TRACE(dl, tgt.display(tout); _src.display(tout); );
|
||||
product_relation const& src = get(_src);
|
||||
(*m_inner_union_fun)(tgt, src[m_single_rel_idx], delta);
|
||||
}
|
||||
|
|
@ -799,7 +799,7 @@ namespace datalog {
|
|||
return alloc(unaligned_union_fn, get(tgt), get(src), get(delta), is_widen);
|
||||
}
|
||||
if (check_kind(src)) {
|
||||
TRACE("dl", tgt.display(tout << "different kinds"); src.display(tout););
|
||||
TRACE(dl, tgt.display(tout << "different kinds"); src.display(tout););
|
||||
const product_relation & p_src = get(src);
|
||||
unsigned single_idx;
|
||||
if(p_src.try_get_single_non_transparent(single_idx)) {
|
||||
|
|
@ -837,7 +837,7 @@ namespace datalog {
|
|||
~mutator_fn() override { dealloc_ptr_vector_content(m_mutators); }
|
||||
|
||||
void operator()(relation_base & _r) override {
|
||||
TRACE("dl", _r.display(tout););
|
||||
TRACE(dl, _r.display(tout););
|
||||
product_relation& r = get(_r);
|
||||
SASSERT(m_mutators.size() == r.size());
|
||||
for (unsigned i = 0; i < r.size(); ++i) {
|
||||
|
|
@ -846,7 +846,7 @@ namespace datalog {
|
|||
(*m)(r[i]);
|
||||
}
|
||||
}
|
||||
TRACE("dl", _r.display(tout););
|
||||
TRACE(dl, _r.display(tout););
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -914,7 +914,7 @@ namespace datalog {
|
|||
~filter_interpreted_fn() override { dealloc_ptr_vector_content(m_mutators); }
|
||||
|
||||
void operator()(relation_base& _r) override {
|
||||
TRACE("dl", _r.display(tout););
|
||||
TRACE(dl, _r.display(tout););
|
||||
product_relation const& r = get(_r);
|
||||
for (unsigned i = 0; i < m_attach.size(); ++i) {
|
||||
m_mutators[m_attach[i].first]->attach(r[m_attach[i].second]);
|
||||
|
|
@ -922,7 +922,7 @@ namespace datalog {
|
|||
for (unsigned i = 0; i < m_mutators.size(); ++i) {
|
||||
(*m_mutators[i])(r[i]);
|
||||
}
|
||||
TRACE("dl", _r.display(tout););
|
||||
TRACE(dl, _r.display(tout););
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -990,7 +990,7 @@ namespace datalog {
|
|||
return;
|
||||
}
|
||||
|
||||
TRACE("dl", {
|
||||
TRACE(dl, {
|
||||
ast_manager& m = get_ast_manager_from_rel_manager(get_manager());
|
||||
sig.output(m, tout); tout << "\n";
|
||||
for (unsigned i = 0; i < spec.size(); ++i) {
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ namespace datalog {
|
|||
}
|
||||
|
||||
void relation_manager::register_relation_plugin_impl(relation_plugin * plugin) {
|
||||
TRACE("dl", tout << "register: " << plugin->get_name() << "\n";);
|
||||
TRACE(dl, tout << "register: " << plugin->get_name() << "\n";);
|
||||
m_relation_plugins.push_back(plugin);
|
||||
plugin->initialize(get_next_relation_fid(*plugin));
|
||||
if (plugin->get_name() == get_context().default_relation()) {
|
||||
|
|
@ -336,7 +336,7 @@ namespace datalog {
|
|||
|
||||
//If there is no plugin to handle the signature, we just create an empty product relation and
|
||||
//stuff will be added to it by later operations.
|
||||
TRACE("dl", s.output(get_context().get_manager(), tout << "empty product relation"); tout << "\n";);
|
||||
TRACE(dl, s.output(get_context().get_manager(), tout << "empty product relation"); tout << "\n";);
|
||||
return product_relation_plugin::get_plugin(*this).mk_empty(s);
|
||||
}
|
||||
|
||||
|
|
@ -532,7 +532,7 @@ namespace datalog {
|
|||
class relation_manager::empty_signature_relation_join_fn : public relation_join_fn {
|
||||
public:
|
||||
relation_base * operator()(const relation_base & r1, const relation_base & r2) override {
|
||||
TRACE("dl", tout << r1.get_plugin().get_name() << " " << r2.get_plugin().get_name() << "\n";);
|
||||
TRACE(dl, tout << r1.get_plugin().get_name() << " " << r2.get_plugin().get_name() << "\n";);
|
||||
if(r1.get_signature().empty()) {
|
||||
if(r1.empty()) {
|
||||
return r2.get_manager().mk_empty_relation(r2.get_signature(), r2.get_kind());
|
||||
|
|
@ -739,7 +739,7 @@ namespace datalog {
|
|||
if(!res && delta && &tgt.get_plugin()!=&delta->get_plugin() && &src.get_plugin()!=&delta->get_plugin()) {
|
||||
res = delta->get_plugin().mk_union_fn(tgt, src, delta);
|
||||
}
|
||||
// TRACE("dl", tout << src.get_plugin().get_name() << " " << tgt.get_plugin().get_name() << " " << (res?"created":"not created") << "\n";);
|
||||
// TRACE(dl, tout << src.get_plugin().get_name() << " " << tgt.get_plugin().get_name() << " " << (res?"created":"not created") << "\n";);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
@ -781,7 +781,7 @@ namespace datalog {
|
|||
: m_filter(filter), m_project(project) {}
|
||||
|
||||
relation_base * operator()(const relation_base & t1) override {
|
||||
TRACE("dl", tout << t1.get_plugin().get_name() << "\n";);
|
||||
TRACE(dl, tout << t1.get_plugin().get_name() << "\n";);
|
||||
scoped_rel<relation_base> aux = t1.clone();
|
||||
(*m_filter)(*aux);
|
||||
relation_base * res = (*m_project)(*aux);
|
||||
|
|
@ -818,7 +818,7 @@ namespace datalog {
|
|||
|
||||
void operator()(relation_base & tgt, const relation_base & intersected_obj) override {
|
||||
scoped_rel<relation_base> filtered_rel = (*m_join_fun)(tgt, intersected_obj);
|
||||
TRACE("dl",
|
||||
TRACE(dl,
|
||||
tgt.display(tout << "tgt:\n");
|
||||
intersected_obj.display(tout << "intersected:\n");
|
||||
filtered_rel->display(tout << "filtered:\n");
|
||||
|
|
@ -828,9 +828,9 @@ namespace datalog {
|
|||
tgt.swap(*filtered_rel);
|
||||
}
|
||||
tgt.reset();
|
||||
TRACE("dl", tgt.display(tout << "target reset:\n"); );
|
||||
TRACE(dl, tgt.display(tout << "target reset:\n"); );
|
||||
(*m_union_fun)(tgt, *filtered_rel);
|
||||
TRACE("dl", tgt.display(tout << "intersected target:\n"); );
|
||||
TRACE(dl, tgt.display(tout << "intersected target:\n"); );
|
||||
}
|
||||
|
||||
};
|
||||
|
|
@ -838,7 +838,7 @@ namespace datalog {
|
|||
relation_intersection_filter_fn * relation_manager::try_mk_default_filter_by_intersection_fn(
|
||||
const relation_base & tgt, const relation_base & src, unsigned joined_col_cnt,
|
||||
const unsigned * tgt_cols, const unsigned * src_cols) {
|
||||
TRACE("dl_verbose", tout << tgt.get_plugin().get_name() << "\n";);
|
||||
TRACE(dl_verbose, tout << tgt.get_plugin().get_name() << "\n";);
|
||||
unsigned_vector join_removed_cols;
|
||||
add_sequence(tgt.get_signature().size(), src.get_signature().size(), join_removed_cols);
|
||||
scoped_rel<relation_join_fn> join_fun = mk_join_project_fn(tgt, src, joined_col_cnt, tgt_cols, src_cols,
|
||||
|
|
@ -866,7 +866,7 @@ namespace datalog {
|
|||
|
||||
relation_intersection_filter_fn * relation_manager::mk_filter_by_intersection_fn(const relation_base & t,
|
||||
const relation_base & src, unsigned joined_col_cnt, const unsigned * t_cols, const unsigned * src_cols) {
|
||||
TRACE("dl_verbose", tout << t.get_plugin().get_name() << "\n";);
|
||||
TRACE(dl_verbose, tout << t.get_plugin().get_name() << "\n";);
|
||||
relation_intersection_filter_fn * res = t.get_plugin().mk_filter_by_intersection_fn(t, src, joined_col_cnt,
|
||||
t_cols, src_cols);
|
||||
if(!res && &t.get_plugin()!=&src.get_plugin()) {
|
||||
|
|
@ -880,7 +880,7 @@ namespace datalog {
|
|||
|
||||
relation_intersection_filter_fn * relation_manager::mk_filter_by_intersection_fn(const relation_base & tgt,
|
||||
const relation_base & src) {
|
||||
TRACE("dl_verbose", tout << tgt.get_plugin().get_name() << "\n";);
|
||||
TRACE(dl_verbose, tout << tgt.get_plugin().get_name() << "\n";);
|
||||
SASSERT(tgt.get_signature()==src.get_signature());
|
||||
unsigned sz = tgt.get_signature().size();
|
||||
unsigned_vector cols;
|
||||
|
|
@ -892,7 +892,7 @@ namespace datalog {
|
|||
relation_intersection_filter_fn * relation_manager::mk_filter_by_negation_fn(const relation_base & t,
|
||||
const relation_base & negated_obj, unsigned joined_col_cnt,
|
||||
const unsigned * t_cols, const unsigned * negated_cols) {
|
||||
TRACE("dl", tout << t.get_plugin().get_name() << "\n";);
|
||||
TRACE(dl, tout << t.get_plugin().get_name() << "\n";);
|
||||
relation_intersection_filter_fn * res = t.get_plugin().mk_filter_by_negation_fn(t, negated_obj, joined_col_cnt,
|
||||
t_cols, negated_cols);
|
||||
if(!res && &t.get_plugin()!=&negated_obj.get_plugin()) {
|
||||
|
|
@ -1552,7 +1552,7 @@ namespace datalog {
|
|||
: m_filter(filter), m_project(project) {}
|
||||
|
||||
table_base * operator()(const table_base & t1) override {
|
||||
TRACE("dl", tout << t1.get_plugin().get_name() << "\n";);
|
||||
TRACE(dl, tout << t1.get_plugin().get_name() << "\n";);
|
||||
scoped_rel<table_base> aux = t1.clone();
|
||||
(*m_filter)(*aux);
|
||||
return (*m_project)(*aux);
|
||||
|
|
|
|||
|
|
@ -301,7 +301,7 @@ namespace datalog {
|
|||
store_offset ofs = m_keys.insert_or_get_reserve_content();
|
||||
index_map::entry * e = m_map.find_core(ofs);
|
||||
if (!e) {
|
||||
TRACE("dl_table_relation", tout << "inserting\n";);
|
||||
TRACE(dl_table_relation, tout << "inserting\n";);
|
||||
e = m_map.insert_if_not_there3(ofs, offset_vector());
|
||||
}
|
||||
return e->get_data().m_value;
|
||||
|
|
@ -495,7 +495,7 @@ namespace datalog {
|
|||
}
|
||||
|
||||
void sparse_table::write_into_reserve(const table_element* f) {
|
||||
TRACE("dl_table_relation", tout << "\n";);
|
||||
TRACE(dl_table_relation, tout << "\n";);
|
||||
m_data.ensure_reserve();
|
||||
char * reserve = m_data.get_reserve_ptr();
|
||||
unsigned col_cnt = m_column_layout.size();
|
||||
|
|
@ -650,7 +650,7 @@ namespace datalog {
|
|||
size_t t1idx = 0;
|
||||
size_t t1end = t1.m_data.after_last_offset();
|
||||
|
||||
TRACE("dl_table_relation",
|
||||
TRACE(dl_table_relation,
|
||||
tout << "joined_col_cnt: " << joined_col_cnt << "\n";
|
||||
tout << "t1_entry_size: " << t1_entry_size << "\n";
|
||||
tout << "t2_entry_size: " << t2_entry_size << "\n";
|
||||
|
|
@ -693,7 +693,7 @@ namespace datalog {
|
|||
for (; t1idx != t1end; t1idx += t1_entry_size) {
|
||||
for (unsigned i = 0; i < joined_col_cnt; i++) {
|
||||
table_element val = t1.m_column_layout.get(t1.get_at_offset(t1idx), t1_joined_cols[i]);
|
||||
TRACE("dl_table_relation", tout << "val: " << val << " " << t1idx << " " << t1_joined_cols[i] << "\n";);
|
||||
TRACE(dl_table_relation, tout << "val: " << val << " " << t1idx << " " << t1_joined_cols[i] << "\n";);
|
||||
if (t1_key[i] != val) {
|
||||
t1_key[i] = val;
|
||||
key_modified = true;
|
||||
|
|
@ -844,7 +844,7 @@ namespace datalog {
|
|||
sparse_table::self_agnostic_join_project(t1, t2, m_cols1.size(), m_cols1.data(),
|
||||
m_cols2.data(), m_removed_cols.data(), false, *res);
|
||||
}
|
||||
TRACE("dl_table_relation", tb1.display(tout); tb2.display(tout); res->display(tout); );
|
||||
TRACE(dl_table_relation, tb1.display(tout); tb2.display(tout); res->display(tout); );
|
||||
return res;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ namespace datalog {
|
|||
|
||||
table_base * tres = (*m_tfun)(tr1.get_table(), tr2.get_table());
|
||||
|
||||
TRACE("dl_table_relation", tout << "# join => "; tres->display(tout););
|
||||
TRACE(dl_table_relation, tout << "# join => "; tres->display(tout););
|
||||
if(&tres->get_plugin()!=&plugin.m_table_plugin) {
|
||||
IF_VERBOSE(1, verbose_stream() << "new type returned\n";);
|
||||
//Operation returned a table of different type than the one which is associated with
|
||||
|
|
@ -154,7 +154,7 @@ namespace datalog {
|
|||
|
||||
table_base * tres = (*m_tfun)(tr.get_table());
|
||||
|
||||
TRACE("dl_table_relation", tout << "# transform => "; tres->display(tout););
|
||||
TRACE(dl_table_relation, tout << "# transform => "; tres->display(tout););
|
||||
if(&tres->get_plugin()!=&plugin.m_table_plugin) {
|
||||
//Transformation returned a table of different type than the one which is associated with this plugin.
|
||||
//We need to get a correct table_relation_plugin and create the relation using it.
|
||||
|
|
@ -262,7 +262,7 @@ namespace datalog {
|
|||
tgt.add_fact(rfact);
|
||||
}
|
||||
}
|
||||
TRACE("dl_table_relation", tout << "# universal union => "; tgt.display(tout););
|
||||
TRACE(dl_table_relation, tout << "# universal union => "; tgt.display(tout););
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -282,7 +282,7 @@ namespace datalog {
|
|||
|
||||
(*m_tfun)(tr_tgt.get_table(), tr_src.get_table(), tr_delta ? &tr_delta->get_table() : nullptr);
|
||||
|
||||
TRACE("dl_table_relation", tout << "# union => "; tr_tgt.get_table().display(tout););
|
||||
TRACE(dl_table_relation, tout << "# union => "; tr_tgt.get_table().display(tout););
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -315,7 +315,7 @@ namespace datalog {
|
|||
SASSERT(r.from_table());
|
||||
table_relation & tr = static_cast<table_relation &>(r);
|
||||
(*m_tfun)(tr.get_table());
|
||||
TRACE("dl_table_relation", tout << "# mutator => "; tr.get_table().display(tout););
|
||||
TRACE(dl_table_relation, tout << "# mutator => "; tr.get_table().display(tout););
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -385,7 +385,7 @@ namespace datalog {
|
|||
const table_relation & tr_src = static_cast<const table_relation &>(src);
|
||||
|
||||
(*m_tfun)(tr.get_table(), tr_src.get_table());
|
||||
TRACE("dl_table_relation", tout << "# negation_filter => "; tr.get_table().display(tout););
|
||||
TRACE(dl_table_relation, tout << "# negation_filter => "; tr.get_table().display(tout););
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -437,7 +437,7 @@ namespace datalog {
|
|||
table_fact vals;
|
||||
get_manager().relation_fact_to_table(get_signature(), f, vals);
|
||||
get_table().add_fact(vals);
|
||||
TRACE("dl_table_relation", tout << "# add fact => "; get_table().display(tout););
|
||||
TRACE(dl_table_relation, tout << "# add fact => "; get_table().display(tout););
|
||||
}
|
||||
|
||||
bool table_relation::contains_fact(const relation_fact & f) const {
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ namespace datalog {
|
|||
equate(col1, sz1 + col2);
|
||||
}
|
||||
|
||||
TRACE("dl_relation",
|
||||
TRACE(dl_relation,
|
||||
r1.display(tout << "r1:\n");
|
||||
r2.display(tout << "r2:\n");
|
||||
display(tout << "dst:\n");
|
||||
|
|
@ -250,7 +250,7 @@ namespace datalog {
|
|||
}
|
||||
|
||||
|
||||
TRACE("dl_relation",
|
||||
TRACE(dl_relation,
|
||||
ast_manager& m = r.get_plugin().get_ast_manager();
|
||||
tout << "Signature: ";
|
||||
for (unsigned i = 0; i < r.get_signature().size(); ++i) {
|
||||
|
|
@ -302,7 +302,7 @@ namespace datalog {
|
|||
mk_rename_elem((*m_elems)[i], col_cnt, cycle);
|
||||
}
|
||||
|
||||
TRACE("dl_relation",
|
||||
TRACE(dl_relation,
|
||||
ast_manager& m = r.get_plugin().get_ast_manager();
|
||||
tout << "cycle: ";
|
||||
for (unsigned i = 0; i < col_cnt; ++i) {
|
||||
|
|
@ -322,7 +322,7 @@ namespace datalog {
|
|||
}
|
||||
|
||||
void mk_union(vector_relation const& src, vector_relation* delta, bool is_widen) {
|
||||
TRACE("dl_relation", display(tout << "dst:\n"); src.display(tout << "src:\n"););
|
||||
TRACE(dl_relation, display(tout << "dst:\n"); src.display(tout << "src:\n"););
|
||||
|
||||
if (src.empty()) {
|
||||
if (delta) {
|
||||
|
|
@ -374,7 +374,7 @@ namespace datalog {
|
|||
else {
|
||||
elems->push_back(mk_unite(t1, t2));
|
||||
}
|
||||
TRACE("dl_relation", tout << t1 << " u " << t2 << " = " << elems->back() << "\n";);
|
||||
TRACE(dl_relation, tout << t1 << " u " << t2 << " = " << elems->back() << "\n";);
|
||||
change = delta && (change || !((*elems)[i] == (*this)[i]));
|
||||
}
|
||||
dealloc(m_eqs);
|
||||
|
|
@ -384,7 +384,7 @@ namespace datalog {
|
|||
if (delta && change) {
|
||||
delta->copy(*this);
|
||||
}
|
||||
TRACE("dl_relation", display(tout << "dst':\n"););
|
||||
TRACE(dl_relation, display(tout << "dst':\n"););
|
||||
}
|
||||
|
||||
unsigned find(unsigned i) const {
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ bool doc_manager::merge(doc& d, unsigned idx, subset_ints const& equalities,
|
|||
}
|
||||
while (idx != root);
|
||||
|
||||
TRACE("doc", tout << "num_x: " << num_x << " value: " << value << "\n";);
|
||||
TRACE(doc, tout << "num_x: " << num_x << " value: " << value << "\n";);
|
||||
if (num_x == 0) {
|
||||
// nothing to do.
|
||||
}
|
||||
|
|
@ -365,7 +365,7 @@ doc* doc_manager::project(doc_manager& dstm, bit_vector const& to_delete, doc co
|
|||
default: UNREACHABLE(); break;
|
||||
}
|
||||
}
|
||||
TRACE("doc",
|
||||
TRACE(doc,
|
||||
tout << "pos: ";
|
||||
for (unsigned i = 0; i < pos.size(); ++i) {
|
||||
tbvm().display(tout, pos[i]) << " ";
|
||||
|
|
@ -685,7 +685,7 @@ void doc_manager::check_equiv(ast_manager& m, expr* fml1, expr* fml2) {
|
|||
solver.assert_expr(fml);
|
||||
lbool res = solver.check();
|
||||
if (res != l_false) {
|
||||
TRACE("doc",
|
||||
TRACE(doc,
|
||||
tout << mk_pp(fml1, m) << "\n";
|
||||
tout << mk_pp(fml2, m) << "\n";
|
||||
);
|
||||
|
|
|
|||
|
|
@ -174,11 +174,11 @@ namespace datalog {
|
|||
processed = false;
|
||||
}
|
||||
(void)processed;
|
||||
TRACE("dl", tout << (processed?"+ ":"- ") << mk_pp(e, m) << "\n";
|
||||
TRACE(dl, tout << (processed?"+ ":"- ") << mk_pp(e, m) << "\n";
|
||||
if (processed) matrix::display_ineq(tout, row, M.b.back(), M.eq.back());
|
||||
);
|
||||
}
|
||||
TRACE("dl", display(tout););
|
||||
TRACE(dl, display(tout););
|
||||
}
|
||||
|
||||
void mk_join(karr_relation const& r1, karr_relation const& r2,
|
||||
|
|
@ -259,7 +259,7 @@ namespace datalog {
|
|||
m_empty = false;
|
||||
m_fn = r.m_fn;
|
||||
|
||||
TRACE("dl",
|
||||
TRACE(dl,
|
||||
for (unsigned i = 0; i < cnt; ++i) {
|
||||
tout << cols[i] << " ";
|
||||
}
|
||||
|
|
@ -286,7 +286,7 @@ namespace datalog {
|
|||
mk_rename(m_basis, col_cnt, cols);
|
||||
}
|
||||
m_fn = r.m_fn;
|
||||
TRACE("dl", r.display(tout); display(tout););
|
||||
TRACE(dl, r.display(tout); display(tout););
|
||||
}
|
||||
|
||||
void mk_union(karr_relation const& src, karr_relation* delta) {
|
||||
|
|
@ -598,7 +598,7 @@ namespace datalog {
|
|||
catch (...) {
|
||||
is_sat = l_undef;
|
||||
}
|
||||
TRACE("dl_verbose", m_hb.display(tout););
|
||||
TRACE(dl_verbose, m_hb.display(tout););
|
||||
if (is_sat == l_false) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -655,7 +655,7 @@ namespace datalog {
|
|||
if (is_sat != l_true) {
|
||||
return;
|
||||
}
|
||||
TRACE("dl_verbose", m_hb.display(tout););
|
||||
TRACE(dl_verbose, m_hb.display(tout););
|
||||
SASSERT(is_sat == l_true);
|
||||
unsigned basis_size = m_hb.get_basis_size();
|
||||
for (unsigned i = 0; i < basis_size; ++i) {
|
||||
|
|
@ -678,7 +678,7 @@ namespace datalog {
|
|||
|
||||
karr_relation& r = get(_r);
|
||||
karr_relation const& src = get(_src);
|
||||
TRACE("dl", r.display(tout << "dst:\n"); src.display(tout << "src:\n"););
|
||||
TRACE(dl, r.display(tout << "dst:\n"); src.display(tout << "src:\n"););
|
||||
|
||||
if (_delta) {
|
||||
karr_relation& d = get(*_delta);
|
||||
|
|
@ -687,7 +687,7 @@ namespace datalog {
|
|||
else {
|
||||
r.mk_union(src, nullptr);
|
||||
}
|
||||
TRACE("dl", r.display(tout << "result:\n"););
|
||||
TRACE(dl, r.display(tout << "result:\n"););
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -707,7 +707,7 @@ namespace datalog {
|
|||
|
||||
void operator()(relation_base & _r) override {
|
||||
karr_relation & r = get(_r);
|
||||
TRACE("dl", r.display(tout << "src:\n"););
|
||||
TRACE(dl, r.display(tout << "src:\n"););
|
||||
r.get_ineqs();
|
||||
for (unsigned i = 1; i < m_identical_cols.size(); ++i) {
|
||||
unsigned c1 = m_identical_cols[0];
|
||||
|
|
@ -721,7 +721,7 @@ namespace datalog {
|
|||
r.m_ineqs.eq.push_back(true);
|
||||
r.m_basis_valid = false;
|
||||
}
|
||||
TRACE("dl", r.display(tout << "result:\n"););
|
||||
TRACE(dl, r.display(tout << "result:\n"););
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -757,7 +757,7 @@ namespace datalog {
|
|||
r.m_ineqs.eq.push_back(true);
|
||||
r.m_basis_valid = false;
|
||||
}
|
||||
TRACE("dl", tout << m_value << "\n"; r.display(tout););
|
||||
TRACE(dl, tout << m_value << "\n"; r.display(tout););
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -779,7 +779,7 @@ namespace datalog {
|
|||
|
||||
void operator()(relation_base& t) override {
|
||||
get(t).filter_interpreted(m_cond);
|
||||
TRACE("dl", tout << mk_pp(m_cond, m_cond.get_manager()) << "\n"; t.display(tout););
|
||||
TRACE(dl, tout << mk_pp(m_cond, m_cond.get_manager()) << "\n"; t.display(tout););
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ namespace datalog {
|
|||
|
||||
lbool result;
|
||||
|
||||
TRACE("dl", m_context.display(tout););
|
||||
TRACE(dl, m_context.display(tout););
|
||||
|
||||
while (true) {
|
||||
m_ectx.reset();
|
||||
|
|
@ -149,11 +149,11 @@ namespace datalog {
|
|||
m_context.ensure_closed();
|
||||
transform_rules();
|
||||
if (m_context.canceled()) {
|
||||
TRACE("dl", tout << "canceled\n";);
|
||||
TRACE(dl, tout << "canceled\n";);
|
||||
result = l_undef;
|
||||
break;
|
||||
}
|
||||
TRACE("dl", m_context.display(tout););
|
||||
TRACE(dl, m_context.display(tout););
|
||||
//IF_VERBOSE(3, m_context.display_smt2(0,0,verbose_stream()););
|
||||
|
||||
if (m_context.print_aig().is_non_empty_string()) {
|
||||
|
|
@ -190,7 +190,7 @@ namespace datalog {
|
|||
IF_VERBOSE(10, m_ectx.report_big_relations(1000, verbose_stream()););
|
||||
|
||||
if (m_context.canceled()) {
|
||||
TRACE("dl", tout << "canceled\n";);
|
||||
TRACE(dl, tout << "canceled\n";);
|
||||
result = l_undef;
|
||||
break;
|
||||
}
|
||||
|
|
@ -206,7 +206,7 @@ namespace datalog {
|
|||
}
|
||||
if (timeout_after_this_round) {
|
||||
m_context.set_status(TIMEOUT);
|
||||
TRACE("dl", tout << "timeout\n";);
|
||||
TRACE(dl, tout << "timeout\n";);
|
||||
result = l_undef;
|
||||
break;
|
||||
}
|
||||
|
|
@ -225,7 +225,7 @@ namespace datalog {
|
|||
sq.reset();
|
||||
}
|
||||
m_context.record_transformed_rules();
|
||||
TRACE("dl", display_profile(tout););
|
||||
TRACE(dl, display_profile(tout););
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -263,7 +263,7 @@ namespace datalog {
|
|||
if (some_non_empty) {
|
||||
m_answer = mk_and(m, ans.size(), ans.data());
|
||||
if (is_approx) {
|
||||
TRACE("dl", tout << "approx\n";);
|
||||
TRACE(dl, tout << "approx\n";);
|
||||
res = l_undef;
|
||||
m_context.set_status(APPROX);
|
||||
}
|
||||
|
|
@ -278,7 +278,7 @@ namespace datalog {
|
|||
m_answer = m.mk_false();
|
||||
break;
|
||||
case l_undef:
|
||||
TRACE("dl", tout << "saturation in undef\n";);
|
||||
TRACE(dl, tout << "saturation in undef\n";);
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
|
|
@ -372,7 +372,7 @@ namespace datalog {
|
|||
m_last_result_relation->to_formula(m_answer);
|
||||
if (!m_last_result_relation->is_precise()) {
|
||||
m_context.set_status(APPROX);
|
||||
TRACE("dl", tout << "approx\n";);
|
||||
TRACE(dl, tout << "approx\n";);
|
||||
res = l_undef;
|
||||
}
|
||||
}
|
||||
|
|
@ -440,7 +440,7 @@ namespace datalog {
|
|||
relation_base & rel = get_relation(pred);
|
||||
|
||||
if (!rel.empty()) {
|
||||
TRACE("dl", tout << "Resetting: " << mk_ismt2_pp(pred, m) << "\n";);
|
||||
TRACE(dl, tout << "Resetting: " << mk_ismt2_pp(pred, m) << "\n";);
|
||||
rel.reset();
|
||||
}
|
||||
}
|
||||
|
|
@ -477,7 +477,7 @@ namespace datalog {
|
|||
void rel_context::set_predicate_representation(func_decl * pred, unsigned relation_name_cnt,
|
||||
symbol const * relation_names) {
|
||||
|
||||
TRACE("dl",
|
||||
TRACE(dl,
|
||||
tout << pred->get_name() << ": ";
|
||||
for (unsigned i = 0; i < relation_name_cnt; ++i) {
|
||||
tout << relation_names[i] << " ";
|
||||
|
|
|
|||
|
|
@ -330,7 +330,7 @@ namespace datalog {
|
|||
relation_base * operator()(const relation_base & _r1, const relation_base & _r2) override {
|
||||
udoc_relation const& r1 = get(_r1);
|
||||
udoc_relation const& r2 = get(_r2);
|
||||
TRACE("doc", r1.display(tout << "r1:\n"); r2.display(tout << "r2:\n"););
|
||||
TRACE(doc, r1.display(tout << "r1:\n"); r2.display(tout << "r2:\n"););
|
||||
udoc_plugin& p = r1.get_plugin();
|
||||
relation_signature const& sig = get_result_signature();
|
||||
udoc_relation * result = alloc(udoc_relation, p, sig);
|
||||
|
|
@ -338,7 +338,7 @@ namespace datalog {
|
|||
udoc const& d2 = r2.get_udoc();
|
||||
udoc& r = result->get_udoc();
|
||||
r.join(d1, d2, dm, dm1, m_cols1, m_cols2);
|
||||
TRACE("doc", result->display(tout << "result:\n"););
|
||||
TRACE(doc, result->display(tout << "result:\n"););
|
||||
IF_VERBOSE(3, result->display(verbose_stream() << "join result:\n"););
|
||||
SASSERT(r.well_formed(result->get_dm()));
|
||||
return result;
|
||||
|
|
@ -369,7 +369,7 @@ namespace datalog {
|
|||
}
|
||||
|
||||
relation_base * operator()(const relation_base & tb) override {
|
||||
TRACE("doc", tb.display(tout << "src:\n"););
|
||||
TRACE(doc, tb.display(tout << "src:\n"););
|
||||
udoc_relation const& t = get(tb);
|
||||
udoc_plugin& p = t.get_plugin();
|
||||
udoc_relation* r = udoc_plugin::get(p.mk_empty(get_result_signature()));
|
||||
|
|
@ -382,7 +382,7 @@ namespace datalog {
|
|||
d2 = dm1.project(dm2, m_to_delete, ud1[i]);
|
||||
ud2.push_back(d2.detach());
|
||||
}
|
||||
TRACE("doc", tout << "final size: " << r->get_size_estimate_rows() << '\n';);
|
||||
TRACE(doc, tout << "final size: " << r->get_size_estimate_rows() << '\n';);
|
||||
SASSERT(ud2.well_formed(dm2));
|
||||
return r;
|
||||
}
|
||||
|
|
@ -427,7 +427,7 @@ namespace datalog {
|
|||
column_info.push_back(column);
|
||||
SASSERT(column == t.get_num_bits());
|
||||
|
||||
TRACE("doc",
|
||||
TRACE(doc,
|
||||
ast_manager& m = p.get_ast_manager();
|
||||
sig1.output(m, tout << "sig1: "); tout << "\n";
|
||||
sig2.output(m, tout << "sig2: "); tout << "\n";
|
||||
|
|
@ -463,7 +463,7 @@ namespace datalog {
|
|||
|
||||
relation_base * operator()(const relation_base & _r) override {
|
||||
udoc_relation const& r = get(_r);
|
||||
TRACE("doc", r.display(tout << "r:\n"););
|
||||
TRACE(doc, r.display(tout << "r:\n"););
|
||||
udoc_plugin& p = r.get_plugin();
|
||||
relation_signature const& sig = get_result_signature();
|
||||
udoc_relation* result = alloc(udoc_relation, p, sig);
|
||||
|
|
@ -474,7 +474,7 @@ namespace datalog {
|
|||
for (unsigned i = 0; i < src.size(); ++i) {
|
||||
dst.push_back(dm.allocate(src[i], m_permutation.data()));
|
||||
}
|
||||
TRACE("doc", result->display(tout << "result:\n"););
|
||||
TRACE(doc, result->display(tout << "result:\n"););
|
||||
SASSERT(dst.well_formed(dm));
|
||||
return result;
|
||||
}
|
||||
|
|
@ -492,7 +492,7 @@ namespace datalog {
|
|||
class udoc_plugin::union_fn : public relation_union_fn {
|
||||
public:
|
||||
void operator()(relation_base & _r, const relation_base & _src, relation_base * _delta) override {
|
||||
TRACE("doc", _r.display(tout << "dst:\n"); _src.display(tout << "src:\n"););
|
||||
TRACE(doc, _r.display(tout << "dst:\n"); _src.display(tout << "src:\n"););
|
||||
udoc_relation& r = get(_r);
|
||||
udoc_relation const& src = get(_src);
|
||||
udoc_relation* d = get(_delta);
|
||||
|
|
@ -503,7 +503,7 @@ namespace datalog {
|
|||
r.get_plugin().mk_union(dm, r.get_udoc(), src.get_udoc(), d1);
|
||||
SASSERT(r.get_udoc().well_formed(dm));
|
||||
SASSERT(!d1 || d1->well_formed(dm));
|
||||
TRACE("doc", _r.display(tout << "dst':\n"); );
|
||||
TRACE(doc, _r.display(tout << "dst':\n"); );
|
||||
IF_VERBOSE(3, r.display(verbose_stream() << "union: "););
|
||||
IF_VERBOSE(3, if (d) d->display(verbose_stream() << "delta: "););
|
||||
}
|
||||
|
|
@ -577,7 +577,7 @@ namespace datalog {
|
|||
doc_manager& dm = r.get_dm();
|
||||
d.merge(dm, m_cols[0], m_size, m_equalities, m_empty_bv);
|
||||
SASSERT(d.well_formed(dm));
|
||||
TRACE("doc", tout << "final size: " << r.get_size_estimate_rows() << '\n';);
|
||||
TRACE(doc, tout << "final size: " << r.get_size_estimate_rows() << '\n';);
|
||||
}
|
||||
};
|
||||
relation_mutator_fn * udoc_plugin::mk_filter_identical_fn(
|
||||
|
|
@ -836,11 +836,11 @@ namespace datalog {
|
|||
apply_guard(e1, sub, equalities, empty);
|
||||
result.subtract(dm, sub);
|
||||
result.simplify(dm);
|
||||
TRACE("doc",
|
||||
TRACE(doc,
|
||||
result.display(dm, tout << "result0:") << "\n";
|
||||
sub.display(dm, tout << "sub:") << "\n";);
|
||||
sub.reset(dm);
|
||||
TRACE("doc", result.display(dm, tout << "result:") << "\n";);
|
||||
TRACE(doc, result.display(dm, tout << "result:") << "\n";);
|
||||
}
|
||||
else if (m.is_or(g)) {
|
||||
udoc sub;
|
||||
|
|
@ -850,9 +850,9 @@ namespace datalog {
|
|||
arg = mk_not(m, to_app(g)->get_arg(i));
|
||||
apply_guard(arg, sub, equalities, discard_cols);
|
||||
}
|
||||
TRACE("doc", result.display(dm, tout << "result0:") << "\n";);
|
||||
TRACE(doc, result.display(dm, tout << "result0:") << "\n";);
|
||||
result.subtract(dm, sub);
|
||||
TRACE("doc",
|
||||
TRACE(doc,
|
||||
sub.display(dm, tout << "sub:") << "\n";
|
||||
result.display(dm, tout << "result:") << "\n";);
|
||||
sub.reset(dm);
|
||||
|
|
@ -923,7 +923,7 @@ namespace datalog {
|
|||
m_udoc.push_back(dm.allocateX());
|
||||
t.apply_guard(guard, m_udoc, m_equalities, m_empty_bv);
|
||||
|
||||
TRACE("doc",
|
||||
TRACE(doc,
|
||||
tout << "original condition: " << mk_pp(condition, m) << "\n";
|
||||
tout << "remaining condition: " << m_reduced_condition << "\n";
|
||||
m_udoc.display(dm, tout) << "\n";);
|
||||
|
|
@ -943,7 +943,7 @@ namespace datalog {
|
|||
SASSERT(u.well_formed(dm));
|
||||
u.simplify(dm);
|
||||
SASSERT(u.well_formed(dm));
|
||||
TRACE("doc", tout << "final size: " << t.get_size_estimate_rows() << '\n';);
|
||||
TRACE(doc, tout << "final size: " << t.get_size_estimate_rows() << '\n';);
|
||||
IF_VERBOSE(3, t.display(verbose_stream()););
|
||||
}
|
||||
};
|
||||
|
|
@ -1030,7 +1030,7 @@ namespace datalog {
|
|||
}
|
||||
}
|
||||
}
|
||||
TRACE("doc", result->display(tout););
|
||||
TRACE(doc, result->display(tout););
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
|
@ -1168,7 +1168,7 @@ namespace datalog {
|
|||
if (!jp->fast_empty()) {
|
||||
t.get_udoc().subtract(dmt, jp->get_udoc());
|
||||
}
|
||||
TRACE("doc", t.display(tout); tout << "\n"; jp->display(tout); tout << "\n";);
|
||||
TRACE(doc, t.display(tout); tout << "\n"; jp->display(tout); tout << "\n";);
|
||||
jp->deallocate();
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue