Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMT2: fix extractbit with non-const index #8180

Merged
merged 1 commit into from
Feb 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/solvers/smt2/smt2_conv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1812,9 +1812,10 @@
// the arguments of the shift need to have the same width
out << "(bvlshr ";
flatten2bv(extractbit_expr.src());
out << ' ';

Check warning on line 1815 in src/solvers/smt2/smt2_conv.cpp

View check run for this annotation

Codecov / codecov/patch

src/solvers/smt2/smt2_conv.cpp#L1815

Added line #L1815 was not covered by tests
typecast_exprt tmp(extractbit_expr.index(), extractbit_expr.src().type());
convert_expr(tmp);
out << ")) bin1)"; // bvlshr, extract, =
out << ")) #b1)"; // bvlshr, extract, =

Check warning on line 1818 in src/solvers/smt2/smt2_conv.cpp

View check run for this annotation

Codecov / codecov/patch

src/solvers/smt2/smt2_conv.cpp#L1818

Added line #L1818 was not covered by tests
}
}
else if(expr.id()==ID_extractbits)
Expand Down
Loading