Most likely the compiler optimizes away the if/then/else (it could for example
transform it into a bitwise operation here). Look at the assembly.ll file
generated in the klee output folder to see what's going on.
Paul
On 14 Jul 2011, at 08:52, Zhang Yufeng wrote:
> Hi, everybody. I am new to klee.
>
> Now I have a problem. Klee generates 3 test cases for the islower() function
> after exploring 3 paths.
>
>
> /*islower.c*/
> int islower(char c)
> {
> if(x >= 'a' && x <= 'z') { return 1;}
> else {return 0;}
> }// end
>
>
> But why it just explores 1 path and generate 1 test case for function abs()?
> The test case is '0'.
>
>
> /*absolute value of integer*/
> int abs(int x) {
> if(x < 0)
> return -1*x;
> else
> return x;
> }// end
>
>
> The difference is that the type of the parameter of two functions are
> different. Anyone can tell me why?
> Thank you very much!
>
> Best.
> Yufeng
> _______________________________________________
> klee-dev mailing list
> klee-dev at keeda.stanford.edu
> http://keeda.Stanford.EDU/mailman/listinfo/klee-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://keeda.Stanford.EDU/pipermail/klee-dev/attachments/20110715/f5b3dc68/attachment.html