I have the following problem when analyzing if-conditions with my plugin. When I analyze code like
if ((a && b) || c)
Frama-C creates code like this:
if (a) {
if (b){
goto _LOR;
}
else{
goto _LAND;
}
}
else{
_LAND: ;
if (c) {
_LOR: //....
For my analysis, I want to get the control-flow without the conditions split up, so that one statement remains. I want this, because by splitting up the conditional, the reaching of _LOR is dependent on the or-part only.
Example: creating the CFG as in the viewcfg
plugin of the developer guide leads to this:
a=(a+b)+c
can be reached in the then
and the else
-path of if a
, which I cancel out in my plugin in the block-statement (so that after a "simple" if
, the statement is not dependent on the condition anymore).
Is there a possibility to block the splitting of the if
, by a command-line argument or something like that?