diff options
author | Lukas Wölfer <lukas.woelfer@rwth-aachen.de> | 2017-06-24 19:31:04 +0200 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2018-05-15 15:18:36 +0100 |
commit | e5a18f47a8cdd37a5c2721e89df68ea7aafed8a0 (patch) | |
tree | 620bd0ab0ce7f737db5ab7f8f656d32ea0849f4a /test | |
parent | 0cf0150da0f674c85f9eaccee8b487ed004c3edc (diff) | |
download | klee-e5a18f47a8cdd37a5c2721e89df68ea7aafed8a0.tar.gz |
Implemented incomplete merging
Diffstat (limited to 'test')
-rw-r--r-- | test/Merging/incomplete_merge.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/test/Merging/incomplete_merge.c b/test/Merging/incomplete_merge.c new file mode 100644 index 00000000..1962cfaa --- /dev/null +++ b/test/Merging/incomplete_merge.c @@ -0,0 +1,47 @@ +// 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 --use-incomplete-merge --debug-log-incomplete-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 --use-incomplete-merge --debug-log-incomplete-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 --use-incomplete-merge --debug-log-incomplete-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 --use-incomplete-merge --debug-log-incomplete-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: + +#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; +} |