diff options
author | Lukas Wölfer <lukas.woelfer@rwth-aachen.de> | 2017-06-24 19:59:48 +0200 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2017-11-30 12:18:15 +0000 |
commit | 60b5c574ea565b3132cc60d946d87a4d1243801b (patch) | |
tree | c7b781fe9aa8c1fdf5b4753ddaa2c694d8878b99 /test/Merging/nested_merge.c | |
parent | bc84fb1f642cbd15064c86d3839e278be536b254 (diff) | |
download | klee-60b5c574ea565b3132cc60d946d87a4d1243801b.tar.gz |
Implemented bounded merging functionality
Diffstat (limited to 'test/Merging/nested_merge.c')
-rw-r--r-- | test/Merging/nested_merge.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/test/Merging/nested_merge.c b/test/Merging/nested_merge.c new file mode 100644 index 00000000..027c72d3 --- /dev/null +++ b/test/Merging/nested_merge.c @@ -0,0 +1,48 @@ +// RUN: %llvmgcc -emit-llvm -g -c -o %t.bc %s +// RUN: rm -rf %t.klee-out +// RUN: klee --output-dir=%t.klee-out --use-merge --debug-log-merge --search=nurs:covnew --use-batching-search %t.bc 2>&1 | FileCheck %s +// RUN: rm -rf %t.klee-out +// RUN: klee --output-dir=%t.klee-out --use-merge --debug-log-merge --search=bfs --use-batching-search %t.bc 2>&1 | FileCheck %s +// RUN: rm -rf %t.klee-out +// RUN: klee --output-dir=%t.klee-out --use-merge --debug-log-merge --search=dfs --use-batching-search %t.bc 2>&1 | FileCheck %s +// RUN: rm -rf %t.klee-out +// RUN: klee --output-dir=%t.klee-out --use-merge --debug-log-merge --search=nurs:covnew %t.bc 2>&1 | FileCheck %s + +// CHECK: open merge: +// 5 close merges +// CHECK: close merge: +// CHECK: close merge: +// CHECK: close merge: +// CHECK: close merge: +// CHECK: close merge: +// CHECK: generated tests = 1{{$}} + +#include <klee/klee.h> + +int main(int argc, char **args) { + + int x; + int a; + int foo = 0; + + klee_make_symbolic(&x, sizeof(x), "x"); + klee_make_symbolic(&a, sizeof(a), "a"); + + klee_open_merge(); + if (a == 0) { + klee_open_merge(); + + if (x == 1) { + foo = 5; + } else if (x == 2) { + foo = 6; + } else { + foo = 7; + } + + klee_close_merge(); + } + klee_close_merge(); + + return foo; +} |