Skip to content

CONTRACTS: is_fresh declarations are handled via the symbol table #6574

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
Jan 17, 2022

Conversation

tautschnig
Copy link
Collaborator

Update the symbol table and auto-generate __CPROVER_initialize
instead of hand-tweaking the function. This will ensure that any
further rebuilding of __CPROVER_initialize preserves those changes.

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a 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 Jan 12, 2022

Codecov Report

Merging #6574 (632b4d1) into develop (4f84963) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #6574      +/-   ##
===========================================
- Coverage    76.20%   76.19%   -0.01%     
===========================================
  Files         1579     1579              
  Lines       181291   181288       -3     
===========================================
- Hits        138144   138141       -3     
  Misses       43147    43147              
Impacted Files Coverage Δ
...rc/goto-instrument/contracts/memory_predicates.cpp 83.61% <100.00%> (-0.28%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 181ab42...632b4d1. Read the comment docs.

Update the symbol table and auto-generate __CPROVER_initialize
instead of hand-tweaking the function. This will ensure that any
further rebuilding of __CPROVER_initialize preserves those changes.
@feliperodri feliperodri added the Code Contracts Function and loop contracts label Jan 15, 2022
Comment on lines +193 to +204
if(parent.get_goto_functions().function_map.erase(INITIALIZE_FUNCTION) != 0)
{
static_lifetime_init(
parent.get_symbol_table(),
parent.get_symbol_table().lookup_ref(INITIALIZE_FUNCTION).location);
goto_convert(
INITIALIZE_FUNCTION,
parent.get_symbol_table(),
parent.get_goto_functions(),
log.get_message_handler());
parent.get_goto_functions().update();
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't that the same as edf6a5c?

Copy link
Contributor

Choose a reason for hiding this comment

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

+1.

May be that PR depends on this one?

@tautschnig tautschnig merged commit bd1b8c2 into diffblue:develop Jan 17, 2022
@tautschnig tautschnig deleted the contracts/init branch January 17, 2022 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code Contracts Function and loop contracts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants