Normalize types in constraints (#5407)

Signed-off-by: Krzysztof Bieganski <[email protected]>
This commit is contained in:
Krzysztof Bieganski
2024-08-27 12:53:44 +02:00
committed by GitHub
parent d40f7f5167
commit f623db7d68
4 changed files with 30 additions and 21 deletions
+2 -2
View File
@@ -551,7 +551,7 @@ class ConstraintExprVisitor final : public VNVisitor {
if (!exprsp->nextp()) return exprsp;
std::ostringstream fmt;
fmt << "(and";
fmt << "(bvand";
for (AstNode* itemp = exprsp; itemp; itemp = itemp->nextp()) fmt << " %@";
fmt << ')';
return new AstSFormatF{fl, fmt.str(), false, exprsp};
@@ -695,7 +695,7 @@ class ConstraintExprVisitor final : public VNVisitor {
AstNode* const cstmtp = new AstText{fl, "ret += \" \" + "};
cstmtp->addNext(itemp);
cstmtp->addNext(new AstText{fl, ";"});
AstNode* const exprsp = new AstText{fl, "([&]{ std::string ret = \"(and\";"};
AstNode* const exprsp = new AstText{fl, "([&]{ std::string ret = \"(bvand\";"};
exprsp->addNext(new AstBegin{
fl, "",
new AstForeach{fl, nodep->arrayp()->unlinkFrBack(), new AstCStmt{fl, cstmtp}},