56 u32_t totalICFGNodes =
_ae->svfir->getICFG()->nodeNum;
60 u32_t analyzedNodes =
_ae->allAnalyzedNodes.size();
64 if (totalICFGNodes > 0)
66 double coveragePercent = (double)analyzedNodes / (
double)totalICFGNodes * 100.0;
74 u32_t callSiteNum = 0;
75 u32_t extCallSiteNum = 0;
78 for (
const auto &it: *
_ae->svfir->getICFG())
80 if (it.second->getFun())
82 funs.insert(it.second->getFun());
84 if (
_ae->allAnalyzedNodes.find(it.second) !=
_ae->allAnalyzedNodes.end())
86 analyzedFuns.insert(it.second->getFun());
107 double funcCoveragePercent = (double)analyzedFuns.size() / (double)funs.size() * 100.0;
122 std::string fullName(
_ae->moduleName);
125 if (fullName.find(
'/') == std::string::npos)
127 std::string
name = fullName;
132 std::string
name = fullName.substr(fullName.find(
'/'), fullName.size());
139 unsigned field_width = 30;
143 if (it->first ==
"ICFG_Coverage_Percent" || it->first ==
"Func_Coverage_Percent")
145 double percent = (double)it->second / 100.0;
146 std::cout << std::setw(field_width) << it->first << std::fixed << std::setprecision(2) << percent <<
"%\n";
150 std::cout << std::setw(field_width) << it->first << it->second <<
"\n";
153 SVFUtil::outs() <<
"-------------------------------------------------------\n";
157 SVFUtil::outs() << std::setw(field_width) << it->first << it->second <<
"\n";
161 SVFUtil::outs() <<
"#######################################################" << std::endl;