Skip to content

fault localization output when unable to localize #230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 27, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions src/cbmc/fault_localization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,17 @@ void fault_localizationt::report(irep_idt goal_id)
{
if(goal_id==ID_nil)
goal_id=failed->source.pc->source_location.get_property_id();

lpointst &lpoints = lpoints_map[goal_id];
assert(!lpoints.empty());

if(lpoints.empty())
{
status() << "["+id2string(goal_id)+"]: \n"
<< " unable to localize fault"
<< eom;
return;
}

debug() << "Fault localization scores:" << eom;
lpointt &max=lpoints.begin()->second;
for(auto &l : lpoints)
Expand Down Expand Up @@ -443,11 +452,14 @@ void fault_localizationt::report(
switch(bmc.ui)
{
case ui_message_handlert::PLAIN:
status() << "\n** Most likely fault location:" << eom;
for(auto &g : goal_map)
if(cover_goals.number_covered()>0)
{
if(g.second.status!=goalt::statust::FAILURE) continue;
report(g.first);
status() << "\n** Most likely fault location:" << eom;
for(auto &g : goal_map)
{
if(g.second.status!=goalt::statust::FAILURE) continue;
report(g.first);
}
}
break;
case ui_message_handlert::XML_UI:
Expand Down