mirror of
https://github.com/Z3Prover/z3
synced 2025-06-07 06:33:23 +00:00
parent
9b609af8fc
commit
75a460cc15
2 changed files with 22 additions and 12 deletions
|
@ -81,6 +81,14 @@ bool rewriter_tpl<Config>::process_const(app * t0) {
|
||||||
SASSERT(t->get_num_args() == 0);
|
SASSERT(t->get_num_args() == 0);
|
||||||
br_status st = m_cfg.reduce_app(t->get_decl(), 0, nullptr, m_r, m_pr);
|
br_status st = m_cfg.reduce_app(t->get_decl(), 0, nullptr, m_r, m_pr);
|
||||||
SASSERT(st != BR_DONE || m().get_sort(m_r) == m().get_sort(t));
|
SASSERT(st != BR_DONE || m().get_sort(m_r) == m().get_sort(t));
|
||||||
|
TRACE("reduce_app",
|
||||||
|
tout << "t0:" << mk_bounded_pp(t0, m()) << "\n";
|
||||||
|
if (t != t0) tout << "t: " << mk_bounded_pp(t, m()) << "\n";
|
||||||
|
tout << "st: " << st;
|
||||||
|
if (m_r) tout << " --->\n" << mk_bounded_pp(m_r, m());
|
||||||
|
tout << "\n";
|
||||||
|
if (m_pr) tout << mk_bounded_pp(m_pr, m()) << "\n";
|
||||||
|
);
|
||||||
switch (st) {
|
switch (st) {
|
||||||
case BR_FAILED:
|
case BR_FAILED:
|
||||||
if (!retried) {
|
if (!retried) {
|
||||||
|
@ -252,8 +260,6 @@ void rewriter_tpl<Config>::process_app(app * t, frame & fr) {
|
||||||
fr.m_i++;
|
fr.m_i++;
|
||||||
if (!visit<ProofGen>(arg, fr.m_max_depth))
|
if (!visit<ProofGen>(arg, fr.m_max_depth))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
func_decl * f = t->get_decl();
|
func_decl * f = t->get_decl();
|
||||||
|
|
||||||
|
@ -292,12 +298,13 @@ void rewriter_tpl<Config>::process_app(app * t, frame & fr) {
|
||||||
}
|
}
|
||||||
br_status st = m_cfg.reduce_app(f, new_num_args, new_args, m_r, m_pr2);
|
br_status st = m_cfg.reduce_app(f, new_num_args, new_args, m_r, m_pr2);
|
||||||
|
|
||||||
CTRACE("reduce_app", st != BR_FAILED,
|
CTRACE("reduce_app", true || st != BR_FAILED || new_t,
|
||||||
tout << mk_bounded_pp(t, m()) << "\n";
|
tout << mk_bounded_pp(t, m()) << "\n";
|
||||||
tout << "st: " << st;
|
tout << "st: " << st;
|
||||||
if (m_r) tout << " --->\n" << mk_bounded_pp(m_r, m());
|
if (m_r) tout << " --->\n" << mk_bounded_pp(m_r, m());
|
||||||
tout << "\n";
|
tout << "\n";
|
||||||
if (m_pr2) tout << mk_bounded_pp(m_pr2, m()) << "\n";
|
if (m_pr2) tout << mk_bounded_pp(m_pr2, m()) << "\n";
|
||||||
|
if (new_t) tout << new_t << "\n";
|
||||||
);
|
);
|
||||||
SASSERT(st == BR_FAILED || rewrites_to(m_r, m_pr2));
|
SASSERT(st == BR_FAILED || rewrites_to(m_r, m_pr2));
|
||||||
SASSERT(st == BR_FAILED || rewrites_from(new_t, m_pr2));
|
SASSERT(st == BR_FAILED || rewrites_from(new_t, m_pr2));
|
||||||
|
@ -421,20 +428,18 @@ void rewriter_tpl<Config>::process_app(app * t, frame & fr) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
if (ProofGen) {
|
|
||||||
m_r = new_t;
|
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
if (fr.m_new_child) {
|
if (fr.m_new_child) {
|
||||||
m_r = m().mk_app(f, new_num_args, new_args);
|
m_r = m().mk_app(f, new_num_args, new_args);
|
||||||
|
if (ProofGen) {
|
||||||
|
m_pr = m().mk_rewrite(t, m_r);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
TRACE("rewriter_reuse", tout << "reusing:\n" << mk_ismt2_pp(t, m()) << "\n";);
|
TRACE("rewriter_reuse", tout << "reusing:\n" << mk_ismt2_pp(t, m()) << "\n";);
|
||||||
m_r = t;
|
m_r = t;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
result_stack().shrink(fr.m_spos);
|
result_stack().shrink(fr.m_spos);
|
||||||
result_stack().push_back(m_r);
|
result_stack().push_back(m_r);
|
||||||
cache_result<ProofGen>(t, m_r, m_pr, fr.m_cache_result);
|
cache_result<ProofGen>(t, m_r, m_pr, fr.m_cache_result);
|
||||||
|
|
|
@ -1174,6 +1174,11 @@ public:
|
||||||
|
|
||||||
void apply_sort_cnstr(enode* n, sort*) {
|
void apply_sort_cnstr(enode* n, sort*) {
|
||||||
TRACE("arith", tout << "sort constraint: " << mk_pp(n->get_owner(), m) << "\n";);
|
TRACE("arith", tout << "sort constraint: " << mk_pp(n->get_owner(), m) << "\n";);
|
||||||
|
#if 0
|
||||||
|
if (!th.is_attached_to_var(n)) {
|
||||||
|
mk_var(n->get_owner());
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void push_scope_eh() {
|
void push_scope_eh() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue