File tree 1 file changed +13
-6
lines changed
1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -214,7 +214,8 @@ namespace mbp {
214
214
expr* x = a->get_arg (i);
215
215
expr* y = b->get_arg (i);
216
216
todo.push_back ({x, y});
217
- }
217
+ }
218
+ bool failed = false ;
218
219
while (!todo.empty ()) {
219
220
auto [x, y] = todo.back ();
220
221
todo.pop_back ();
@@ -223,8 +224,10 @@ namespace mbp {
223
224
SASSERT (ry);
224
225
if (rx == ry)
225
226
continue ;
226
- if (rx)
227
- break ; // fail
227
+ if (rx) {
228
+ failed = true ;
229
+ break ;
230
+ }
228
231
if (m_parents[x].size () > 1 )
229
232
// a crude safey hatch to preserve models
230
233
// we could require that every parent of x
@@ -233,16 +236,20 @@ namespace mbp {
233
236
break ;
234
237
expr* s = nullptr ;
235
238
if (soln.find (x, s)) {
236
- if (s != ry)
239
+ if (s != ry) {
240
+ failed = true ;
237
241
break ;
242
+ }
238
243
continue ;
239
244
}
240
245
if (is_var (x)) {
241
246
soln.insert (x, ry);
242
247
continue ;
243
248
}
244
- if (!same_decl (x, y))
249
+ if (!same_decl (x, y)) {
250
+ failed = true ;
245
251
break ;
252
+ }
246
253
app* ax = to_app (x);
247
254
app* ay = to_app (y);
248
255
for (unsigned i = 0 ; i < ax->get_num_args (); ++i)
@@ -257,7 +264,7 @@ namespace mbp {
257
264
);
258
265
259
266
260
- if (todo.empty () && !soln.empty ()) {
267
+ if (!failed && todo.empty () && !soln.empty ()) {
261
268
for (auto [key, value] : soln) {
262
269
vars.erase (to_app (key));
263
270
defs.push_back ( { expr_ref (key, m), expr_ref (value, m) });
You can’t perform that action at this time.
0 commit comments