Skip to content

Update to CBMC 5.7 #148

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 2 commits into from
Mar 12, 2021
Merged

Conversation

FrNecas
Copy link
Contributor

@FrNecas FrNecas commented Mar 11, 2021

Following up on peterschrammel/cbmc#21 , adjusting 2LS to the changes in CBMC 5.7. I will squash the commits before this PR is merged to have an atomic compilable commit but leaving it as is (per type of change) to make reviewing easier. May also require changing the CBMC commit used once peterschrammel/cbmc#21 is merged.

Major changes

  • abstract domains have to implement make_bottom, make_top and make_entry methods. The changes also required adjusting merge return value in our domains to make the analyses work correctly. The fix was inspired by Data-flow analysis must always enter new function cbmc#327
  • goto_inlinet no longer recomputes locations after inlining, 2LS must call it itself (see Goto function inlining cbmc#262)
  • new types of memsafety asserts lead to the assert numbering in test changing
  • otherwise just some minor renaming

Copy link
Collaborator

@viktormalik viktormalik left a comment

Choose a reason for hiding this comment

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

LGTM, just small nits

@FrNecas FrNecas force-pushed the frnecas-cbmc-5.7 branch 2 times, most recently from b2e050d to a9abc16 Compare March 12, 2021 09:32
@FrNecas
Copy link
Contributor Author

FrNecas commented Mar 12, 2021

Proposal for how this should be merged: firstly merge the PR in CBMC, modify acbeed7 so that it points to a correct commit, squash this whole PR into 2 commits - one commit for the changes themselves and one for 2LS version update. Do you agree @peterschrammel or can you think of a better way to handle this?

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.

peterschrammel/cbmc#21 is merged. Please rebase.

@peterschrammel
Copy link
Member

peterschrammel commented Mar 12, 2021

Proposal for how this should be merged

Yes, please.

FrNecas added 2 commits March 12, 2021 11:14
Replace i2string with std::to_string.
Adjust abstract domains:
 - In CBMC 5.7, abstract domains work slightly differently than they used
   to. Methods for creating top, bottom and entry must be implemented.
   Moreover, the first merge could have no effect resulting in the function
   not being entered due to changes in abstract interpretation
   implementation in CBMC.
Replace dstring with dstringt.
Replace deprecated gen_zero.
Fix GOTO check options.
Change graph to grapht.
Add missing argument to goto_inlinet constructor call.
Recompute locations after inlining.
Adjust memsafety tests to new checks.

Signed-off-by: František Nečas <[email protected]>
Signed-off-by: František Nečas <[email protected]>
@FrNecas
Copy link
Contributor Author

FrNecas commented Mar 12, 2021

Rebased onto 2ls-prerequisites-cbmc-5.7, squashed the commits, ready to be merged. Thanks for the quick reviews.

@peterschrammel peterschrammel merged commit ac8efba into diffblue:master Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants