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

Fix Heapster type-checking bugs for Rust #1519

Merged
merged 18 commits into from
Nov 23, 2021

Conversation

eddywestbrook
Copy link
Contributor

This PR fixes some bugs and adds some features in order to progress Heapster type-checking for Rust programs. The changes include:

  • changed how memblock permisisons with variable shapes are proved, so that they look for permissions on the left that contain the offsets on the right, not just those that precisely line up with them

  • performance enhancement: changed a number of fmaps and mbMap2s in Implication.hs to use mbMapCl, to avoid the performance overhead of changing fresh pairs to fresh functions

  • added support for proving sub-byte-sized fields using a truncation rule

  • switched the pretty-printer to use layoutPretty instead of layoutSmart to avoid exponential behavior; also switched ppCommaSep to use the built-in library function punctuate

  • changed SImpl_SplitLLVMWordField, SImpl_TruncateLLVMWordField, and SImpl_ConcatLLVMWordFields to PermImpl1 rules that generate fresh variables for the splitting, truncation, and concatenation of bitvector values, respectively, in order to handle symbolic values in these rules

Eddy Westbrook added 18 commits November 16, 2021 14:05
…that they look for permissions on the left that contain the offsets on the right, not just those that precisely line up with them
…lication.hs to use mbMapCl, to avoid the performance overhead of changing fresh pairs to fresh functions
…, to avoid the performance overhead of changing fresh pairs to fresh functions
…t to avoid exponential behavior; also switched ppCommaSep to use the built-in library function punctuate
…mpl_ConcatLLVMWordFields to PermImpl1 rules that generate fresh variables for the splitting, truncation, and concatenation of bitvector values, respectively, in order to handle symbolic values
Copy link
Contributor

@m-yac m-yac left a comment

Choose a reason for hiding this comment

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

Looks good to me, though I can't say I reviewed most of the changes in Implication.hs much beyond just Haskell style, both due to the large number of changes and and due to my unfamiliarity with that part of the codebase. But since all the existing and new tests pass that gives me a good amount of confidence this all works.

@eddywestbrook eddywestbrook added subsystem: heapster Issues specifically related to memory verification using Heapster PR: ready to merge Magic flag for pull requests to ask Mergify to merge given an approval and a successful CI run labels Nov 23, 2021
@mergify mergify bot merged commit e53ddb8 into master Nov 23, 2021
@mergify mergify bot deleted the heapster/rust-typechecking-bugs-pr branch November 23, 2021 00:47
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants