Open
Conversation
rralf
reviewed
Aug 20, 2020
Previously analyse compared all patches under consideration disregarding previous evaluation results. This patch adds a new differential flag that utilises the existing evaluation results and only compares the newly added patches to the existing ones, reducing the number of comparisons. The differential evaluation process can be explained as follows: result = new_patches X existing_patches + new_patches X new_patches = new_patches X (new_patches + existing_patches) = new_patches X victims Signed-off-by: Rohit Sarkar <rohitsarkar5398@gmail.com>
b6ada56 to
5f9d088
Compare
d931c43 to
f7b9a6f
Compare
6e20a89 to
3006c20
Compare
f6992dd to
5499f20
Compare
eba830f to
483fccf
Compare
56b12df to
96f2fd9
Compare
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.
There is a scope for optimising the analysis process when it comes to differential analyses, ie. we already have some existing analyses results in PaStA and some new patches arrive for analyses.
What PaStA currently does is it assigns each of these new patches to a single element cluster, and then it runs the complete analyses again. This results in a lot of redundant comparisons. Example:
Consider the following existing state clusters of PaStA. I have indexed each cluster for illustration purposes:
PaStA performed around 8*8 comparisons (ignoring other thresholds that PaStA has for now). For further comparisons PaStA will use the representative of each cluster, let's take the first element of each cluster above to be it's representative.ie repr( 1 2 3) = 1.
Now consider that patches 9 and 10 arrive. They will be assigned to their own single element clusters, ie:
In the current situation PaStA performs 5x5 comparisons (compare representative of each cluster against the other).
But we can reduce this by only comparing representatives of existing clusters with newly arriving patches as the other comparisons have already been done in the previous step. ie we reduce the comparisons to 3x2. Additionally we will also need to compare the new patches against each other a further 2x2 comparisons. Combined a total of 5x2 comparisons which is still much less than the naive way.
This can be written in a crude mathematical way as follows:
Things to consider
the evaluation results that have been cached does not contain all the information