Skip to content
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

Progress on Mr. Solver SHA512 example #1661

Merged
merged 20 commits into from
May 13, 2022
Merged

Progress on Mr. Solver SHA512 example #1661

merged 20 commits into from
May 13, 2022

Conversation

m-yac
Copy link
Contributor

@m-yac m-yac commented May 11, 2022

This PR contains initial progress on getting a SHA512 example working with Mr. Solver. Aside from adding this example to the Heapster examples directory, it contains the following changes.

  • Add proper handling of vector literals to Mr. Solver. This mostly involved adding a case to smtNormPrims for genBVVecFromVec of a vector literal, which turns the term into a genBVVec of a large chain of ites. It also involved adding more general cases for atM and updateM to normComp.
  • Add a case to askMRSolverH for a BVVec on one side but a Vec on the other. This involved adding a genFromBVVec function to the prelude, which is unfolded during the SMT step in smtNormPrims.
  • (d166857) In getDetVarsClauses, determinedVars, etc, instead of keeping track of seen determined vars as a NameSet, keep track of them as a NameMap to the list of DetVarsClauses they determine. This fixes a bug where a variable was not getting considered determined because the variable which determines it was already seen, but in a context where it was not determined. By keeping track of the determined vars for each seen variable, it allows us to figure our first variable is determined in the former context.
  • (6c3ab4d) Modify suitableAP such to check that either the borrows of the two permissions are equal or the range [off,len) is not fully borrowed, instead of just the latter. This fixes a bug where we were unable to prove x -o x for a fully borrowed array permission x.

Sorry this PR is so many changes lumped together! In the future I will try to keep PRs limited to single changes.

@m-yac m-yac added subsystem: heapster Issues specifically related to memory verification using Heapster subsystem: MRSolver Issues related to the Mr. Solver monadic-recursive solver in Heapster labels May 11, 2022
@m-yac m-yac requested a review from eddywestbrook May 11, 2022 17:57
Copy link
Contributor

@eddywestbrook eddywestbrook left a comment

Choose a reason for hiding this comment

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

This all looks good, thanks Matt!

@eddywestbrook eddywestbrook added the PR: ready to merge Magic flag for pull requests to ask Mergify to merge given an approval and a successful CI run label May 13, 2022
@mergify mergify bot merged commit 7a8fc9a into master May 13, 2022
@mergify mergify bot deleted the mr-solver/sha512 branch May 13, 2022 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: ready to merge Magic flag for pull requests to ask Mergify to merge given an approval and a successful CI run subsystem: heapster Issues specifically related to memory verification using Heapster subsystem: MRSolver Issues related to the Mr. Solver monadic-recursive solver in Heapster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants