Skip to content

Commit 1d1a01c

Browse files
update logging
1 parent dbcbc6c commit 1d1a01c

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

src/ast/euf/euf_ac_plugin.cpp

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,6 @@ namespace euf {
307307
}
308308

309309
void ac_plugin::collect_statistics(statistics& st) const {
310-
311310
std::string name = m_name.str();
312311
m_superposition_stats = symbol((std::string("ac ") + name + " superpositions"));
313312
m_eqs_stats = symbol((std::string("ac ") + name + " equations"));
@@ -320,8 +319,10 @@ namespace euf {
320319
return;
321320
m_fuel += m_fuel_inc;
322321
auto j = justification::equality(l, r);
323-
TRACE(plugin, tout << "merge: " << m_name << " " << g.bpp(l) << " == " << g.bpp(r) << " " << is_op(l) << " " << is_op(r) << "\n");
324-
init_equation(eq(to_monomial(l), to_monomial(r), j));
322+
auto m1 = to_monomial(l);
323+
auto m2 = to_monomial(r);
324+
TRACE(plugin, tout << "merge: " << m_name << " " << g.bpp(l) << " == " << g.bpp(r) << " " << m_pp_ll(*this, monomial(m1)) << " == " << m_pp_ll(*this, monomial(m2)) << "\n");
325+
init_equation(eq(m1, m2, j));
325326
}
326327

327328
void ac_plugin::diseq_eh(enode* eq) {
@@ -1063,14 +1064,13 @@ namespace euf {
10631064
break;
10641065
}
10651066
for (auto eq : n->eqs) {
1066-
if (!is_processed(eq))
1067+
continue;
1068+
if (!is_reducing(eq)) // also can use processed?
10671069
continue;
10681070
auto& src = m_eqs[eq];
10691071

1070-
if (!is_equation_oriented(src)) {
1071-
//verbose_stream() << "equation is not oriented: " << m_eq_ll(*this, src) << "\n";
1072-
continue;
1073-
}
1072+
if (!is_equation_oriented(src))
1073+
continue;
10741074
if (!can_be_subset(monomial(src.l), m, b))
10751075
continue;
10761076
if (!is_subset(m_m_counts, m_eq_counts, monomial(src.l)))
@@ -1134,7 +1134,7 @@ namespace euf {
11341134
unsigned max_left = std::max(monomial(src.l).size(), monomial(dst.l).size());
11351135
unsigned min_right = std::max(monomial(src.r).size(), monomial(dst.r).size());
11361136

1137-
TRACE(plugin, tout << "superpose: "; display_equation_ll(tout, src); tout << " "; display_equation_ll(tout, dst); tout << "\n";);
1137+
11381138
// AB -> C, AD -> E => BE ~ CD
11391139
// m_src_ids, m_src_counts contains information about src (call it AD -> E)
11401140
m_dst_l_counts.reset();
@@ -1175,20 +1175,22 @@ namespace euf {
11751175
return false;
11761176
}
11771177

1178-
TRACE(plugin, tout << "superpose result: " << m_pp_ll(*this, m_src_r) << "== " << m_pp_ll(*this, m_dst_r) << "\n";);
1179-
11801178
justification j = justify_rewrite(src_eq, dst_eq);
11811179
reduce(m_dst_r, j);
11821180
reduce(m_src_r, j);
11831181
deduplicate(m_src_r, m_dst_r);
1184-
TRACE(plugin, tout << "superpose result: " << m_pp_ll(*this, m_src_r) << "== " << m_pp_ll(*this, m_dst_r) << "\n";);
1182+
11851183

11861184
bool added_eq = false;
11871185
auto src_r = src.r;
11881186
unsigned max_left_new = std::max(m_src_r.size(), m_dst_r.size());
11891187
unsigned min_right_new = std::min(m_src_r.size(), m_dst_r.size());
11901188
if (max_left_new <= max_left && min_right_new <= min_right)
11911189
added_eq = init_equation(eq(to_monomial(m_src_r), to_monomial(m_dst_r), j));
1190+
1191+
CTRACE(plugin, added_eq,
1192+
tout << "superpose: " << m_name << " " << eq_pp_ll(*this, src) << " " << eq_pp_ll(*this, dst) << " --> ";
1193+
tout << m_pp_ll(*this, m_src_r) << "== " << m_pp_ll(*this, m_dst_r) << "\n";);
11921194

11931195
m_src_r.reset();
11941196
m_src_r.append(monomial(src_r).m_nodes);

0 commit comments

Comments
 (0)