@@ -138,6 +138,8 @@ namespace bv {
138
138
void sls::try_repair_down (app* e) {
139
139
140
140
if (eval_is_correct (e)) {
141
+ // if (bv.is_bv(e))
142
+ // verbose_stream() << mk_pp(e, m) << " := " << m_eval.wval(e) << "\n";
141
143
m_repair_roots.remove (m_repair_root);
142
144
m_repair_root = UINT_MAX;
143
145
return ;
@@ -147,7 +149,6 @@ namespace bv {
147
149
if (n == 0 ) {
148
150
auto & v = m_eval.wval (e);
149
151
v.commit_eval ();
150
- verbose_stream () << mk_pp (e, m) << " := " << v << " \n " ;
151
152
for (auto p : m_terms.parents (e))
152
153
m_repair_up.insert (p->get_id ());
153
154
m_repair_roots.remove (m_repair_root);
@@ -193,11 +194,25 @@ namespace bv {
193
194
return false ;
194
195
}
195
196
197
+
198
+ bool sls::re_eval_is_correct (app* e) {
199
+ if (!m_eval.can_eval1 (e))
200
+ return false ;
201
+ if (m.is_bool (e))
202
+ return m_eval.bval0 (e) == m_eval.bval1 (e);
203
+ if (bv.is_bv (e)) {
204
+ auto const & v = m_eval.eval (e);
205
+ return v.eval == v.bits ();
206
+ }
207
+ UNREACHABLE ();
208
+ return false ;
209
+ }
210
+
196
211
model_ref sls::get_model () {
197
212
model_ref mdl = alloc (model, m);
198
213
auto & terms = m_eval.sort_assertions (m_terms.assertions ());
199
214
for (expr* e : terms) {
200
- if (!eval_is_correct (to_app (e))) {
215
+ if (!re_eval_is_correct (to_app (e))) {
201
216
verbose_stream () << " missed evaluation #" << e->get_id () << " " << mk_bounded_pp (e, m) << " \n " ;
202
217
if (bv.is_bv (e)) {
203
218
auto const & v = m_eval.wval (e);
0 commit comments