-
Notifications
You must be signed in to change notification settings - Fork 273
Refactor replace_history_parameter #7686
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
Merged
tautschnig
merged 4 commits into
diffblue:develop
from
tautschnig:cleanup/refactor-replace_history_parameter
May 15, 2023
Merged
Refactor replace_history_parameter #7686
tautschnig
merged 4 commits into
diffblue:develop
from
tautschnig:cleanup/refactor-replace_history_parameter
May 15, 2023
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #7686 +/- ##
===========================================
- Coverage 78.55% 78.48% -0.07%
===========================================
Files 1686 1686
Lines 192923 192930 +7
===========================================
- Hits 151552 151427 -125
- Misses 41371 41503 +132
☔ View full report in Codecov by Sentry. |
remi-delmas-3000
approved these changes
Apr 25, 2023
Will hold back on merging this until after #7541 is merged. |
feliperodri
approved these changes
May 4, 2023
7814587
to
6d9d4a9
Compare
This function had some in/out parameters that were really only used as out parameters, and also an undocumented (but crucial) `id` parameter. Said `id` can only have one of two permitted values, so replace one function with a parameter by two functions that have said `id` encoded in the name. Return out-parameters by value rather than via references.
There are no ordering requirements here, so we can benefit from O(1) amortised cost. Also, the value type is always a `symbol_exprt`, not just a generic `exprt`.
Reduce the indentation level by doing early returns, and do the map lookup just once instead of three times.
6d9d4a9
to
d875666
Compare
The C front-end already performs the very same check.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
aws
Bugs or features of importance to AWS CBMC users
cleanup
Code Contracts
Function and loop contracts
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please review commit-by-commit. This is drive-by cleanup while reviewing #7672 with the hope to make it easier to read.