| CPC G06F 11/3684 (2013.01) [G06F 11/3676 (2013.01)] | 28 Claims |

|
1. A code analysis method performed by a processor, the method comprising:
converting an expression indicated by a source code to a Boolean expression, the expression including n conditions;
generating a binary expression tree including a plurality of nodes based on the Boolean expression;
initializing a flip limit and a number of flips of each of the plurality of nodes by analyzing whether each of the plurality of nodes is a leaf node of which a name is an operand or a parent node of which a name is an operator;
generating a first test case by initialization Boolean values of each of a plurality of parent nodes each of which a name is an operator among the plurality of nodes and two child nodes of the plurality of parent nodes to one of a plurality of valid cases; and
generating n test cases by performing a flip on all node having flip feasibility on a path from a root node to a leaf node of the binary expression tree based on the first test case, and storing the first test and the n test cases,
wherein the flip is reversing the Boolean value of each corresponding node among the plurality of nodes, and the n is a natural number greater than or equal to 2.
|