-
Notifications
You must be signed in to change notification settings - Fork 274
remove bitwise_neg(mp_integer) #3104
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
Conversation
The semantics of this operation is highly machine-dependent, and thus, it's difficult to use. The single user is replaced by xor -1.
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.
Ok, but I do wonder whether it would be more suitable for the interpreter to turn the mp_integer
into a bitvector, then do the operation on a bitvector, and turn the result back into an mp_integer
. (But that would apply to all bit operations, not just the one touched here.)
You mean bitvector as in |
No, I was thinking of |
Ah; well, there's an entirely different interpreter that just uses simplify(). That could directly apply to expressions at the top-level, without the need to even split by expression. |
Maybe that's all that should be done? What's the point of the current implementation? |
Another option is to the use parts of path-based symex that aren't symbolic. |
(which in turn uses simplify()). |
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: d22e9b9).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/87102220
The semantics of this operation is highly machine-dependent, and thus, it's
difficult to use. The single user is replaced by xor -1.