3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-29 01:18:45 +00:00

rewrite some simplifiers

This commit is contained in:
Nikolaj Bjorner 2022-11-30 23:15:32 +09:00
parent 23c53c6820
commit edb0fc394b
8 changed files with 81 additions and 237 deletions

View file

@ -125,7 +125,7 @@ void elim_unconstrained::init_nodes() {
m_fmls.freeze_suffix();
expr_ref_vector terms(m);
for (unsigned i = qhead(); i < qtail(); ++i)
for (unsigned i : indices())
terms.push_back(m_fmls[i].fml());
m_trail.append(terms);
m_heap.reset();
@ -201,7 +201,7 @@ void elim_unconstrained::gc(expr* t) {
*/
void elim_unconstrained::reconstruct_terms() {
expr_ref_vector terms(m);
for (unsigned i = qhead(); i < qtail(); ++i)
for (unsigned i : indices())
terms.push_back(m_fmls[i].fml());
for (expr* e : subterms_postorder::all(terms)) {
@ -234,8 +234,7 @@ void elim_unconstrained::reconstruct_terms() {
void elim_unconstrained::assert_normalized(vector<dependent_expr>& old_fmls) {
unsigned sz = qtail();
for (unsigned i = qhead(); i < sz; ++i) {
for (unsigned i : indices()) {
auto [f, d] = m_fmls[i]();
node& n = get_node(f);
expr* g = n.m_term;