@@ -146,13 +146,9 @@ class bmc_covert:
146
146
}
147
147
};
148
148
149
- inline irep_idt id (
150
- goto_programt::const_targett loc,
151
- const std::string suffix=" " )
149
+ inline irep_idt id (goto_programt::const_targett loc)
152
150
{
153
- return id2string (loc->function )+
154
- " #" +i2string (loc->location_number )+
155
- suffix;
151
+ return loc->source_location .get_property_id ();
156
152
}
157
153
158
154
typedef std::map<irep_idt, goalt> goal_mapt;
@@ -261,20 +257,6 @@ bool bmc_covert::operator()()
261
257
// stop the time
262
258
absolute_timet sat_start=current_time ();
263
259
264
- // we don't want the assertions to become constraints
265
- for (symex_target_equationt::SSA_stepst::iterator
266
- it=bmc.equation .SSA_steps .begin ();
267
- it!=bmc.equation .SSA_steps .end ();
268
- it++)
269
- if (it->type ==goto_trace_stept::ASSERT)
270
- it->type =goto_trace_stept::LOCATION;
271
-
272
- bmc.do_conversion ();
273
-
274
- // bmc.equation.output(std::cout);
275
-
276
- std::map<goto_programt::const_targett, irep_idt> location_map;
277
-
278
260
// Collect _all_ goals in `goal_map'.
279
261
// This maps property IDs to 'goalt'
280
262
forall_goto_functions (f_it, goto_functions)
@@ -291,6 +273,12 @@ bool bmc_covert::operator()()
291
273
}
292
274
}
293
275
276
+ // Do conversion to next solver layer
277
+
278
+ bmc.do_conversion ();
279
+
280
+ // bmc.equation.output(std::cout);
281
+
294
282
// collects assumptions
295
283
and_exprt::operandst assumptions;
296
284
@@ -306,9 +294,13 @@ bool bmc_covert::operator()()
306
294
307
295
if (it->source .pc ->is_assert ())
308
296
{
309
- and_exprt c_expr (conjunction (assumptions), literal_exprt (it->guard_literal ));
310
- literalt c=solver.convert (c_expr);
311
- goal_map[id (it->source .pc )].add_instance (it, c);
297
+ exprt c=
298
+ conjunction ({
299
+ conjunction (assumptions),
300
+ literal_exprt (it->guard_literal ),
301
+ literal_exprt (it->cond_literal ) });
302
+ literalt l_c=solver.convert (c);
303
+ goal_map[id (it->source .pc )].add_instance (it, l_c);
312
304
}
313
305
}
314
306
0 commit comments