-
Notifications
You must be signed in to change notification settings - Fork 274
Remove void_typet #4102
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
Remove void_typet #4102
Conversation
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.
🚫
This PR failed Diffblue compatibility checks (cbmc commit: 75d5d28).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/99859081
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.
Common spurious failures:
- the cbmc commit has disappeared in the mean time (e.g. in a force-push)
- the author is not in the list of contributors (e.g. first-time contributors).
The incompatibility may have been introduced by an earlier PR. In that case merging this
PR should be avoided unless it fixes the current incompatibility.
I'm assuming the bot failure is genuine: @svorenova @thk123 whenever time permits, could you scan TG for occurrences of |
You could also change |
@tautschnig I made the companion PR here: https://github.com/diffblue/test-gen/pull/2999 Note that I would like to merge my PR before this one, to avoid clash. |
@svorenova Thank you very much - yes, please do let me know when it's merged, I'd like to keep the bot (and thus TG) happy at all times to avoid spurious messages being posted. |
75d5d28
to
8a28d16
Compare
Done, which made some further room for improvement apparent. I hope the additional 5 commits are ok to be in this PR. |
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.
🚫
This PR failed Diffblue compatibility checks (cbmc commit: 8a28d16).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/99961187
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.
Common spurious failures:
- the cbmc commit has disappeared in the mean time (e.g. in a force-push)
- the author is not in the list of contributors (e.g. first-time contributors).
The incompatibility may have been introduced by an earlier PR. In that case merging this
PR should be avoided unless it fixes the current incompatibility.
I updated the companion PR https://github.com/diffblue/test-gen/pull/2999 |
@tautschnig The companion PR is merged now, you can merge this 👍 |
void_typet and empty_typet are effectively the same, but weren't consistently used and thus void_typet is going away.
There was a mix of empty_typet, void_typet, and actual uses of java_void_type. At the moment, they are all the same, but there is no compile-time guarantee that this remains true.
void_typet was only sometimes used.
void_typet had 25 uses across the codebase, while its equivalent empty_typet has 84 uses. Only sometimes using "void_typet" requires that empty_typet and void_typet forever stay the same.
This is consistent with what is done in the Java front-end. Also use the same trick to construct only a single, shared instance of it.
Should we ever choose to add any annotations consistent use of the generator function will ensure these are available.
Use empty_typet as done in all other places.
This has been cleaned up in f573d97 already, and future changes might see complete removal of type() from codet.
Don't do incremental updates which may result in objects that do not match what we build via constructors.
8a28d16
to
32f4aa5
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: 32f4aa5).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/100076282
Now this has been merged, but I have a question: Wouldn't it be better instead of completely removing That would make the API better and the semantics of some code much closer to the semantics of the languages they supposedly model (like C code). Because as far I understand the |
I had pondered to introduce a typedef, but my main concern was that there was no consistent use of one or the other. I have tried to clean this up, and now ended up (trying to) make consistent use of |
I suggest reviewing commit-by-commit.