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.
Code changes of this PR includes the general changes that support cross-package for NilAway. However, that part is not migrated to GitHub yet so I can only rebase onto zzq/function-contracts/general-nonnil. Ideally we should have another PR for the general changes to support cross-package between and rebase this PR to the PR.
What was done:
Future work:
The current implementation does not work sometimes, because it creates a primitivizer in function analyzer but the position information this primitivizer obtains will be conflicting with those obtained from the primitivizer in accumulation analyzer.
Function analyzer cannot get the column number for every object from upstream, because unlike InferredMap exported in accumuulation analyzer, the Implication exported in function analyzer does not contain every exported object in upstream (We store only duplicable implications there)
Thus, a entirely new implementation is needed. We have to move all the logic of duplicating full triggers from function analyzer to accumalation analyzer (i.e., inference phase), so we maintain only one primitivizer and the position information (column number) of upstream objects can be obtained from upstream packages correctly.
PS:
Did not find integration tests here so I did not migrate integration cross-packge tests but they can be found in the internal version of this pull request.