mirror of
https://github.com/Z3Prover/z3
synced 2026-06-26 10:28:48 +00:00
parent
22c2635786
commit
f034616950
24 changed files with 1000 additions and 3462 deletions
|
|
@ -19,7 +19,6 @@ Notes:
|
|||
#include "ast/rewriter/bool_rewriter.h"
|
||||
#include "params/bool_rewriter_params.hpp"
|
||||
#include "ast/rewriter/rewriter_def.h"
|
||||
#include "ast/rewriter/expr_safe_replace.h"
|
||||
#include "ast/ast_lt.h"
|
||||
#include "ast/for_each_expr.h"
|
||||
#include <algorithm>
|
||||
|
|
@ -1186,30 +1185,4 @@ void bool_rewriter::mk_ge2(expr* a, expr* b, expr* c, expr_ref& r) {
|
|||
}
|
||||
|
||||
|
||||
bool bool_rewriter::decompose_ite(expr *r, expr_ref &c, expr_ref &th, expr_ref &el) {
|
||||
expr *cond = nullptr, *r1 = nullptr, *r2 = nullptr;
|
||||
if (m().is_ite(r, cond, r1, r2)) {
|
||||
c = cond;
|
||||
th = r1;
|
||||
el = r2;
|
||||
return true;
|
||||
}
|
||||
for (expr *e : subterms::ground(expr_ref(r, m()))) {
|
||||
if (m().is_ite(e, cond, r1, r2)) {
|
||||
m_rep1.reset();
|
||||
m_rep2.reset();
|
||||
m_rep1.insert(e, r1);
|
||||
m_rep2.insert(e, r2);
|
||||
c = cond;
|
||||
th = r;
|
||||
el = r;
|
||||
m_rep1(th);
|
||||
m_rep2(el);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
template class rewriter_tpl<bool_rewriter_cfg>;
|
||||
template class rewriter_tpl<bool_rewriter_cfg>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue