File tree 2 files changed +15
-5
lines changed
2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,7 @@ namespace bv {
171
171
}
172
172
else {
173
173
m_eval.repair_up (e);
174
+ SASSERT (eval_is_correct (e));
174
175
for (auto p : m_terms.parents (e))
175
176
m_repair_up.insert (p->get_id ());
176
177
}
@@ -191,8 +192,17 @@ namespace bv {
191
192
model_ref mdl = alloc (model, m);
192
193
auto & terms = m_eval.sort_assertions (m_terms.assertions ());
193
194
for (expr* e : terms) {
195
+ if (!eval_is_correct (to_app (e))) {
196
+ verbose_stream () << " missed evaluation #" << e->get_id () << " " << mk_bounded_pp (e, m) << " \n " ;
197
+ if (bv.is_bv (e)) {
198
+ auto const & v0 = m_eval.wval0 (e);
199
+ auto const & v1 = m_eval.wval1 (to_app (e));
200
+ verbose_stream () << v0 << " \n " << v1 << " \n " ;
201
+ }
202
+ }
194
203
if (!is_uninterp_const (e))
195
204
continue ;
205
+
196
206
auto f = to_app (e)->get_decl ();
197
207
if (m.is_bool (e))
198
208
mdl->register_decl (f, m.mk_bool_val (m_eval.bval0 (e)));
Original file line number Diff line number Diff line change @@ -1020,7 +1020,7 @@ namespace bv {
1020
1020
unsigned parity_e = e.parity (e.bits );
1021
1021
unsigned parity_b = b.parity (b.bits );
1022
1022
1023
- #if 0
1023
+ #if 1
1024
1024
1025
1025
auto & x = m_tmp;
1026
1026
auto & y = m_tmp2;
@@ -1521,9 +1521,9 @@ namespace bv {
1521
1521
}
1522
1522
1523
1523
bool sls_eval::try_repair_extract (bvval const & e, bvval& a, unsigned lo) {
1524
- for (unsigned i = 0 ; i < a .bw ; ++i)
1525
- if (!a.get (a.fixed , i))
1526
- a.set (a.bits , i, e.get (e.bits , i + lo ));
1524
+ for (unsigned i = 0 ; i < e .bw ; ++i)
1525
+ if (!a.get (a.fixed , i + lo ))
1526
+ a.set (a.bits , i + lo , e.get (e.bits , i));
1527
1527
return true ;
1528
1528
}
1529
1529
@@ -1553,6 +1553,6 @@ namespace bv {
1553
1553
if (m.is_bool (e))
1554
1554
set (e, bval1 (to_app (e)));
1555
1555
else if (bv.is_bv (e))
1556
- wval0 (e).try_set (wval1 (to_app (e)));
1556
+ wval0 (e).set (wval1 (to_app (e)));
1557
1557
}
1558
1558
}
You can’t perform that action at this time.
0 commit comments