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

Heapster array field implications #1459

Merged
merged 54 commits into from
Sep 17, 2021
Merged

Heapster array field implications #1459

merged 54 commits into from
Sep 17, 2021

Conversation

eddywestbrook
Copy link
Contributor

This PR extends the Heapster implication prover to apply permission implication to the fields of array permissions. That is, it allows proving an implication

x:array(off, <len, *stride, [fld1,...,fldn]) -o x:array(off, <len, *stride, [fld1',...,fldn'])

by proving that y:fld1 * ... * fldn -o y:fld1' * ... * fldn'. This required revisiting the old SImpl_LLVMArrayContents rule (which was not used before this PR) and updating it so that it uses a local permission implication, a concept that was created for lowned permissions.

This change also required revisiting how local permission implications are translated. Specifically, local implications x1:p1,...,xn:pn -o y1:q1,...,ym:qm previously tupled the translations of the input and output permissions using strict tupling, which maps the list of types [T1,...,Tn] to the right-nested tuple type T1 * (T2 * ... * (Tn * #())), with the tupling operation that leaves off the final unit type, i.e., that maps a list of types to the type T1 * (T2 * ... * (Tn-1 * Tn)).

The following minor changes were also added as part of this PR:

  • slight tweak to the SImpl_LLVMArrayRearrange rule
  • added debug info for tracing the execution of proveVarLLVMArray_ArrayStep
  • expanded widening so that it unfolds named permissions

Eddy Westbrook added 30 commits August 31, 2021 12:27
…made the translation of bitvector permissions to just be bitvectors
… be converted to unit, not to the empty struct
…a HeapsterEnv into a single function which iterates through the globals and adds those it can handle
…macro, because that seems to be the proper way to do things
…ons with different fields using the SImpl_LLVMArrayContents rule; to get the translation of the SImpl_LLVMArrayContents to work correctly, I had to change local implications to not use strict tuples, which in turn required changing the translation of lowned permissions (which are themselves local implications) to not use strict tuples as well
@eddywestbrook eddywestbrook added the subsystem: heapster Issues specifically related to memory verification using Heapster label Sep 15, 2021
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. As always, I can't say I really understand what's going on in the implication checker, but everything else looks great. The simplifications to the tuple types and hints are awesome.

@eddywestbrook eddywestbrook merged commit fc74c6a into master Sep 17, 2021
@mergify mergify bot deleted the heapster-array-impls branch September 17, 2021 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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