-
Notifications
You must be signed in to change notification settings - Fork 277
Error handling cleanup in solvers/flattening 7 #2944
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
Error handling cleanup in solvers/flattening 7 #2944
Conversation
src/solvers/flattening/equality.cpp
Outdated
@@ -24,10 +24,9 @@ literalt equalityt::equality(const exprt &e1, const exprt &e2) | |||
|
|||
literalt equalityt::equality2(const exprt &e1, const exprt &e2) | |||
{ | |||
const typet &type=e1.type(); | |||
PRECONDITION(e2.type() != e1.type()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those better be equal ;-)
src/solvers/flattening/equality.cpp
Outdated
throw "equalityt got boolean equality"; | ||
// return lequal(convert(e1), convert(e2)); | ||
INVARIANT( | ||
type.id() != ID_bool, "method shall not be used to compare boolean types"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/boolean/Boolean/
INVARIANT_WITH_DIAGNOSTICS( | ||
false, | ||
"flatten_byte_update should only be used on arrays of scalars", | ||
subtype.id_string()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it can soundly be used on other types, it's just not yet implemented...
Files equality.cpp to pointer_logic.h
0ccb8e8
to
d07bba7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passed Diffblue compatibility checks (cbmc commit: d07bba7).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/85574428
@tautschnig I think this is ready to be merged. |
No description provided.