Example :
if(A & B)
{
if(C)
{
}
if(D)
{
}
}
We have four different states for all the conditions in this code. 0 represents False and 1 represents true state. * shows that the condition is not valid in this state flow. So in this case, all the possible states are listed below.
A B C D
0 * * *
1 0 * *
1 1 1 0
1 1 0 1
Explanation : In first state (0 * * *), the condition A is true. So there is no role for B in the code. Becuase after evaluating the A itself the if case is failed. Therefore the conditions C and D also are not evaluated. Like wise the three other possible states also.
But is there any already implemented algorithms by which i can find all these states for a particular input. Because this thing turns to be huge complex problem when we try to solve more complex nested code. I think it's very difficult to code an application to give such a result.
If any one knows some kind of already implemented things which may help me, please let me know about the same.