本文整理汇总了C++中CFG::initial方法的典型用法代码示例。如果您正苦于以下问题:C++ CFG::initial方法的具体用法?C++ CFG::initial怎么用?C++ CFG::initial使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFG
的用法示例。
在下文中一共展示了CFG::initial方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: verify
ProgramCFG::ProgramCFG(Module &m):M(m){
root = NULL;
nodes = NULL;
clock_t start,finish;
start=clock();
errs() <<"START CHECK FUNCTION <"<<funcname<<">~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";
//Create the cfg Structure
CFG* cfg = new CFG();
cfg->counter_state = 0;
cfg->counter_variable = 0;
cfg->counter_s_state = 0;
cfg->counter_state = 0;
buildProgramCFG(m, cfg);
CFG *cfg1=new CFG();
cfg->initial();
finish=clock();
double buildTime = 1000*(double)(finish-start)/CLOCKS_PER_SEC;
errs() << "BUILDCFG Time: \t" << convertToString(buildTime) << "ms\n";
int inputbound=bound;
double dreal_time=0;
if(check=="")
{
clock_t start,finish;
start=clock();
BoundedVerification verify(cfg,inputbound,target);
verify.check(dreal_time,check);
finish=clock();
}
else {
cfg1=Add_target(cfg,target[0],check);
cfg1->initial();
vector<int> new_target;
for(unsigned int i=0;i<cfg1->stateList.size();i++){
if(cfg1->stateList[i].name.at(0)=='q')
new_target.push_back(cfg1->stateList[i].ID);
}
clock_t start,finish;
start=clock();
BoundedVerification verify(cfg1,inputbound,new_target);
verify.check(dreal_time,check);
finish=clock();
}
errs() << "bound:\t" << bound <<"\tfunctionName:\t" << funcname << "\tcheck:\t" << check << "\n";
errs() << "Time: \t" << convertToString(1000*(double)(finish-start)/CLOCKS_PER_SEC) << "s \n";
errs() << "BUILDCFG Time: \t" << convertToString(buildTime) << "ms\n";
errs() << "Dreal Time: \t" << convertToString(dreal_time/1000) << "s\n";
double mem_used_peak = memUsedPeak();
double cpu_time = cpuTime();
char mem_str[64];
if (mem_used_peak != 0)
sprintf(mem_str, "Memory used: %.2f MB\n", mem_used_peak);
char time_str[64];
sprintf(time_str, "CPU Time: %g s\n", cpu_time);
errs()<<mem_str<<time_str;
}