3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 01:25:31 +00:00

disable ackerman reduction when head contains a non-constant/non-variable. #947

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-03-17 10:12:32 -07:00
parent a0237ed2a6
commit d754aa2dc4
3 changed files with 11 additions and 6 deletions

View file

@ -126,6 +126,12 @@ namespace datalog {
app* s;
var* v;
// disable Ackerman reduction if head contains a non-variable or non-constant argument.
for (unsigned i = 0; i < to_app(head)->get_num_args(); ++i) {
expr* arg = to_app(head)->get_arg(i);
if (!is_var(arg) && !m.is_value(arg)) return false;
}
for (unsigned i = 0; i < conjs.size(); ++i) {
expr* e = conjs[i].get();
if (is_select_eq_var(e, s, v)) {
@ -281,6 +287,7 @@ namespace datalog {
m_rewriter(body);
sub(head);
m_rewriter(head);
TRACE("dl", tout << body << " => " << head << "\n";);
change = ackermanize(r, body, head);
if (!change) {
rules.add_rule(&r);

View file

@ -394,10 +394,6 @@ namespace datalog {
m_simp(a, simp1_res);
(*m_rw)(simp1_res.get(), res);
/*if (simp1_res.get()!=res.get()) {
std::cout<<"pre norm:\n"<<mk_pp(simp1_res.get(),m)<<"post norm:\n"<<mk_pp(res.get(),m)<<"\n";
}*/
m_simp(res.get(), res);
}