0

I am using KLEE to generate test data for function. But the test data generated by KLEE makes me in some troubles.

Input:

void arrange(int a[]) {
    ...
}

Here is a test data in KLEE:

...
object    0: name: 'a'
object    0: size: 40
object    0: data:
'\xa0\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'

In this test case, I have understood that the size of variable a is 40 bytes. It means that each block of four continuous numbers (e.g., the first block \xa0\xff\xff\xff represents an integer). However, what is the demical value of \xa0\xff\xff\xff?

ducanhnguyen
  • 161
  • 1
  • 10

2 Answers2

0

For KLEE, it's just a memory block.

klee_make_symbolic() function, which takes three arguments: the address of the variable (memory location) that we want to treat as symbolic, its size, and a name (which can be anything).

hailinzeng
  • 966
  • 9
  • 24
0

You can transfer it to integer by writing:

ktest-tool --write-ints t000001.ktest
Paul Roub
  • 36,322
  • 27
  • 84
  • 93
Sally
  • 1
  • For integer variable, I can see its real value. However, it is not in human readable format if the variable belongs to array. – ducanhnguyen Jun 14 '17 at 09:56