Download Paper - STS
Transcript
4 Future Work & Conclusion
4.1 Future Work
The whole approach by Muske et al. consists of a combination of backwards analysis
and forwards analysis to find redundant warnings. So far the plug-in implements the
forwards analysis, but the backwards analysis is missing. Combining these analyses,
one can find larger sets of redundant warnings. Therefore, fewer warnings need to be
displayed which could reduce the reviewing efforts even more.
Further, using Frama-C it might be better to use annotations instead of expressions.
Tracking annotations, we can compare them by their predicates. Using these predicates,
we probably can group more annotations together as we do now. However, it could be
harder to find the annotations we need to kill without saving the expressions.
1
2
3
4
5
6
7
void f 1 ( int x ) {
int h ;
i f ( x != 0 )
h = 1/ x ;
else
h = 1/ x ;
}
Listing 4.1: Path Sensitivity Example
Having the analysis as described by Muske et al., there is still room for improvements.
We could add some path sensitivity to the analysis. Lst. 4.1 is an example where path
sensitivity can improve the result of the analysis. In case the condition of the if holds,
we know that the expression in line 4 cannot be a division-by-zero fault. Here, we can
propagate that x 6= 0 to the then branch. Therefore, we do not have to display a
division-by-zero warning in the then branch unless we reassign x to 0,. Further, we
could try to track assignments.
1
2
3
4
5
void f 1 ( int x , int y ) {
int h = 1/ x ;
y = x;
h = 1/ y ;
}
Listing 4.2: Assignment Tracking Example
Lst. 4.2 shows an example where assignment tracking could help us. Tracking that y=x,
we can conclude that the warnings corresponding to line 2 and 4 are actually redundant.
Still, even though there are a few topics open, the plug-in already is a working prototype.
23