File tree 1 file changed +17
-5
lines changed
1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -258,8 +258,17 @@ void fault_localizationt::report(irep_idt goal_id)
258
258
{
259
259
if (goal_id==ID_nil)
260
260
goal_id=failed->source .pc ->source_location .get_property_id ();
261
+
261
262
lpointst &lpoints = lpoints_map[goal_id];
262
- assert (!lpoints.empty ());
263
+
264
+ if (lpoints.empty ())
265
+ {
266
+ status () << " [" +id2string (goal_id)+" ]: \n "
267
+ << " unable to localize fault"
268
+ << eom;
269
+ return ;
270
+ }
271
+
263
272
debug () << " Fault localization scores:" << eom;
264
273
lpointt &max=lpoints.begin ()->second ;
265
274
for (auto &l : lpoints)
@@ -443,11 +452,14 @@ void fault_localizationt::report(
443
452
switch (bmc.ui )
444
453
{
445
454
case ui_message_handlert::PLAIN:
446
- status () << " \n ** Most likely fault location:" << eom;
447
- for (auto &g : goal_map)
455
+ if (cover_goals.number_covered ()>0 )
448
456
{
449
- if (g.second .status !=goalt::statust::FAILURE) continue ;
450
- report (g.first );
457
+ status () << " \n ** Most likely fault location:" << eom;
458
+ for (auto &g : goal_map)
459
+ {
460
+ if (g.second .status !=goalt::statust::FAILURE) continue ;
461
+ report (g.first );
462
+ }
451
463
}
452
464
break ;
453
465
case ui_message_handlert::XML_UI:
You can’t perform that action at this time.
0 commit comments