Limit YAML witness invariants to to-be-read and just-written variables#819
Merged
Limit YAML witness invariants to to-be-read and just-written variables#819
Conversation
Existing access analysis is really about races and doesn't do anything in singlethreaded more or for local variables.
…d interfering with access and mutex analysis
Member
michael-schwarz
left a comment
There was a problem hiding this comment.
As soon as the comment about the unitAnalysis is addressed, I think this is good to merge!
Member
Author
|
This will conflict with #833 and I think it'll be easier to have that merged first. |
michael-schwarz
approved these changes
Oct 3, 2022
sim642
added a commit
that referenced
this pull request
Oct 4, 2022
This was referenced Oct 13, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As discussed in GobCon, this would be something to somewhat limit the large number of invariants we generate.
Since accesses are to lvalues, not just variables, this also has lvalue granularity, because accessing a field in a large struct will the only emit one invariant about that field instead of all the fields of the struct.
Changes
MayAccessedquery to use it in YAML witness generation.Accessevent andInvariantquery from optionalvarinfoto lvalue set.Still uses a separateSimplify base analysis invariant logic to use a single lvalue instead of invariant context.Invariant.context1within the base analysis because the existing logic is per-lvalue.Invariantquery offset handling in base analysis.querytracing.