|
|
|
@ -16,11 +16,6 @@ void recordBranches(z3::expr_vector &OldVec){
|
|
|
|
|
Branches.push_back(E.to_string().c_str());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/*
|
|
|
|
|
for(const auto &E : Branches){
|
|
|
|
|
printf("%s\n", E.c_str());
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void searchStrategy(z3::expr_vector &OldVec) {
|
|
|
|
@ -34,34 +29,22 @@ void searchStrategy(z3::expr_vector &OldVec) {
|
|
|
|
|
searchStrategy(OldVec);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
//printf("e%d:%s\n\n",i, e.to_string().c_str());
|
|
|
|
|
if(e.to_string().substr(1, 3) != NOT){
|
|
|
|
|
std::string newExpr = e.to_string();
|
|
|
|
|
//printf("expr0:%s\n", newExpr.c_str());
|
|
|
|
|
if(newExpr.find("false") != std::string::npos){
|
|
|
|
|
newExpr = newExpr.replace(newExpr.end()-6, newExpr.end()-1,"true");
|
|
|
|
|
} else{
|
|
|
|
|
newExpr = newExpr.replace(newExpr.end()-5, newExpr.end()-1,"false");
|
|
|
|
|
}
|
|
|
|
|
//printf("expr1:%s\n", newExpr.c_str());
|
|
|
|
|
if(std::find(Branches.begin(), Branches.end(), newExpr) == Branches.end()){
|
|
|
|
|
//printf("newpath\n");
|
|
|
|
|
OldVec.pop_back();
|
|
|
|
|
OldVec.push_back(not e);
|
|
|
|
|
//printf("new\n");
|
|
|
|
|
/*
|
|
|
|
|
for(auto EX : OldVec){
|
|
|
|
|
printf("%s\n", EX.to_string().c_str());
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
} else{
|
|
|
|
|
//printf("back\n");
|
|
|
|
|
OldVec.pop_back();
|
|
|
|
|
searchStrategy(OldVec);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
//printf("unsat\n");
|
|
|
|
|
OldVec.pop_back();
|
|
|
|
|
searchStrategy(OldVec);
|
|
|
|
|
}
|
|
|
|
|