Fixed generation of smt2 concat statements

This commit is contained in:
Clifford Wolf 2015-08-15 11:45:44 +02:00
parent 1e67b29919
commit b659ffb457
1 changed files with 5 additions and 3 deletions

View File

@ -201,10 +201,12 @@ struct Smt2Worker
}
if (GetSize(subexpr) > 1) {
std::string expr = "(concat";
for (int i = GetSize(subexpr)-1; i >= 0; i--)
std::string expr = "", end_str = "";
for (int i = GetSize(subexpr)-1; i >= 0; i--) {
if (i > 0) expr += " (concat", end_str += ")";
expr += " " + subexpr[i];
return expr + ")";
}
return expr.substr(1) + end_str;
} else {
log_assert(GetSize(subexpr) == 1);
return subexpr[0];