Skip to content

Factor out re-creating __CPROVER_initialize into a function #7680

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
merged 1 commit into from
May 17, 2023

Conversation

tautschnig
Copy link
Collaborator

@tautschnig tautschnig commented Apr 21, 2023

This avoids repeating the almost-same code in several places, and moves
a helper that is not DFCC-specific to the global context.

The first two commits are #7678 and #7679.

  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@codecov
Copy link

codecov bot commented May 5, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.01 ⚠️

Comparison is base (ba47c86) 78.55% compared to head (1909f3e) 78.55%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7680      +/-   ##
===========================================
- Coverage    78.55%   78.55%   -0.01%     
===========================================
  Files         1686     1686              
  Lines       192923   192897      -26     
===========================================
- Hits        151552   151526      -26     
  Misses       41371    41371              
Impacted Files Coverage Δ
...instrument/contracts/dynamic-frames/dfcc_utils.cpp 89.57% <ø> (-0.36%) ⬇️
...o-instrument/contracts/dynamic-frames/dfcc_utils.h 100.00% <ø> (ø)
src/goto-cc/linker_script_merge.cpp 78.16% <100.00%> (-0.38%) ⬇️
.../goto-instrument/contracts/dynamic-frames/dfcc.cpp 98.06% <100.00%> (ø)
...rc/goto-instrument/contracts/memory_predicates.cpp 84.57% <100.00%> (-0.40%) ⬇️
src/goto-instrument/stack_depth.cpp 100.00% <100.00%> (ø)
src/goto-programs/link_to_library.cpp 100.00% <100.00%> (ø)
src/goto-programs/slice_global_inits.cpp 92.98% <100.00%> (-0.67%) ⬇️
src/linking/static_lifetime_init.cpp 98.78% <100.00%> (+0.15%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tautschnig tautschnig force-pushed the cleanup/recreate-init branch from 218fc13 to 44cfcac Compare May 5, 2023 11:55
@feliperodri feliperodri added the aws Bugs or features of importance to AWS CBMC users label May 9, 2023
Copy link
Member

@peterschrammel peterschrammel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@peterschrammel peterschrammel removed their assignment May 10, 2023
goto_modelt &goto_model,
message_handlert &message_handler)
{
if(goto_model.unload(INITIALIZE_FUNCTION) != 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be sensible to make it a precondition that the initialize function exists, as opposed to doing a silent no-op?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have now changed the usage model according to your suggestion.

This avoids repeating the almost-same code in several places, and moves
a helper that is not DFCC-specific to the global context.
@tautschnig tautschnig force-pushed the cleanup/recreate-init branch from 44cfcac to 1909f3e Compare May 15, 2023 09:10
@tautschnig tautschnig assigned kroening and unassigned tautschnig May 15, 2023
@kroening kroening merged commit 889a84b into diffblue:develop May 17, 2023
@tautschnig tautschnig deleted the cleanup/recreate-init branch May 17, 2023 19:59
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 blocker
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants