-
Notifications
You must be signed in to change notification settings - Fork 63
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
Conversation
…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
…ld split and truncate rules
…ncorrect check in implLLVMFieldConcat
…oper output contents after concatenating
There was a problem hiding this 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.
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
fmap
s andmbMap2
s in Implication.hs to usembMapCl
, to avoid the performance overhead of changing fresh pairs to fresh functionsadded support for proving sub-byte-sized fields using a truncation rule
switched the pretty-printer to use
layoutPretty
instead oflayoutSmart
to avoid exponential behavior; also switchedppCommaSep
to use the built-in library functionpunctuate
changed
SImpl_SplitLLVMWordField
,SImpl_TruncateLLVMWordField
, andSImpl_ConcatLLVMWordFields
toPermImpl1
rules that generate fresh variables for the splitting, truncation, and concatenation of bitvector values, respectively, in order to handle symbolic values in these rules