Add support for differential analyses #77
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