bool ConstraintManager::rewriteConstraints(ExprVisitor &visitor) { ConstraintManager::constraints_ty old; bool changed = false; constraints.swap(old); for (ConstraintManager::constraints_ty::iterator it = old.begin(), ie = old.end(); it != ie; ++it) { ref<Expr> &ce = *it; ref<Expr> e = visitor.visit(ce); if (e!=ce) { addConstraintInternal(e); // enable further reductions changed = true; } else { constraints.push_back(ce); } } return changed; }
void accept(ExprVisitor& v) const { v.visit(*this); }