diff options
author | Frank Busse <bb0xfb@gmail.com> | 2020-09-04 10:24:33 +0100 |
---|---|---|
committer | MartinNowack <2443641+MartinNowack@users.noreply.github.com> | 2020-10-12 11:31:05 +0100 |
commit | 8cb0d545138cbb876318ed6d578b2b6a6a92b81a (patch) | |
tree | 6c3e56b40c3f727b9e2cf8b4aa9f5d0bf0f1e39c | |
parent | 1636b93e6675dd392a15c52cfc022fbf0589ecd8 (diff) | |
download | klee-8cb0d545138cbb876318ed6d578b2b6a6a92b81a.tar.gz |
MergingSearcher: remove random-path incompatibility
-rw-r--r-- | lib/Core/UserSearcher.cpp | 15 | ||||
-rw-r--r-- | test/Merging/easy_merge.c | 2 | ||||
-rw-r--r-- | test/Merging/incomplete_merge.c | 2 | ||||
-rw-r--r-- | test/Merging/loop_merge.c | 2 | ||||
-rw-r--r-- | test/Merging/merge_fail.c | 2 | ||||
-rw-r--r-- | test/Merging/nested_merge.c | 2 | ||||
-rw-r--r-- | test/Merging/split_merge.c | 2 |
7 files changed, 16 insertions, 11 deletions
diff --git a/lib/Core/UserSearcher.cpp b/lib/Core/UserSearcher.cpp index 7acca58e..e1534f70 100644 --- a/lib/Core/UserSearcher.cpp +++ b/lib/Core/UserSearcher.cpp @@ -13,7 +13,6 @@ #include "MergeHandler.h" #include "Searcher.h" -#include "klee/Solver/SolverCmdLine.h" #include "klee/Support/ErrorHandling.h" #include "llvm/Support/CommandLine.h" @@ -98,10 +97,10 @@ void klee::initializeSearchOptions() { bool klee::userSearcherRequiresMD2U() { return (std::find(CoreSearch.begin(), CoreSearch.end(), Searcher::NURS_MD2U) != CoreSearch.end() || - std::find(CoreSearch.begin(), CoreSearch.end(), Searcher::NURS_CovNew) != CoreSearch.end() || - std::find(CoreSearch.begin(), CoreSearch.end(), Searcher::NURS_ICnt) != CoreSearch.end() || - std::find(CoreSearch.begin(), CoreSearch.end(), Searcher::NURS_CPICnt) != CoreSearch.end() || - std::find(CoreSearch.begin(), CoreSearch.end(), Searcher::NURS_QC) != CoreSearch.end()); + std::find(CoreSearch.begin(), CoreSearch.end(), Searcher::NURS_CovNew) != CoreSearch.end() || + std::find(CoreSearch.begin(), CoreSearch.end(), Searcher::NURS_ICnt) != CoreSearch.end() || + std::find(CoreSearch.begin(), CoreSearch.end(), Searcher::NURS_CPICnt) != CoreSearch.end() || + std::find(CoreSearch.begin(), CoreSearch.end(), Searcher::NURS_QC) != CoreSearch.end()); } @@ -148,12 +147,6 @@ Searcher *klee::constructUserSearcher(Executor &executor) { } if (UseMerge) { - if (std::find(CoreSearch.begin(), CoreSearch.end(), Searcher::RandomPath) != - CoreSearch.end()) { - klee_error("use-merge currently does not support random-path, please use " - "another search strategy"); - } - auto *ms = new MergingSearcher(searcher); executor.setMergingSearcher(ms); diff --git a/test/Merging/easy_merge.c b/test/Merging/easy_merge.c index be77bcb9..a33e9c62 100644 --- a/test/Merging/easy_merge.c +++ b/test/Merging/easy_merge.c @@ -8,6 +8,8 @@ // 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 // RUN: rm -rf %t.klee-out +// RUN: %klee --output-dir=%t.klee-out --use-merge --debug-log-merge --search=random-path %t.bc 2>&1 | FileCheck %s +// RUN: rm -rf %t.klee-out // RUN: %klee --output-dir=%t.klee-out --use-merge --debug-log-merge %t.bc 2>&1 | FileCheck %s // CHECK: open merge: diff --git a/test/Merging/incomplete_merge.c b/test/Merging/incomplete_merge.c index 783ab993..41d55e84 100644 --- a/test/Merging/incomplete_merge.c +++ b/test/Merging/incomplete_merge.c @@ -7,6 +7,8 @@ // 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 +// 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=random-path %t.bc 2>&1 | FileCheck %s // CHECK: open merge: // 5 close merges diff --git a/test/Merging/loop_merge.c b/test/Merging/loop_merge.c index 49dbbfb4..860d8dd7 100644 --- a/test/Merging/loop_merge.c +++ b/test/Merging/loop_merge.c @@ -5,6 +5,8 @@ // RUN: %klee --output-dir=%t.klee-out --use-merge --debug-log-merge --search=dfs %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 +// RUN: rm -rf %t.klee-out +// RUN: %klee --output-dir=%t.klee-out --use-merge --debug-log-merge --search=random-path %t.bc 2>&1 | FileCheck %s // CHECK: open merge: // There will be 20 'close merge' statements. Only checking a few, the generated diff --git a/test/Merging/merge_fail.c b/test/Merging/merge_fail.c index 8cfd40f0..00ea21ef 100644 --- a/test/Merging/merge_fail.c +++ b/test/Merging/merge_fail.c @@ -5,6 +5,8 @@ // RUN: %klee --output-dir=%t.klee-out --use-merge --debug-log-merge --search=dfs %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 +// RUN: rm -rf %t.klee-out +// RUN: %klee --output-dir=%t.klee-out --use-merge --debug-log-merge --search=random-path %t.bc 2>&1 | FileCheck %s // CHECK: open merge: // CHECK: generated tests = 2{{$}} diff --git a/test/Merging/nested_merge.c b/test/Merging/nested_merge.c index f5f571d4..4fa49f37 100644 --- a/test/Merging/nested_merge.c +++ b/test/Merging/nested_merge.c @@ -7,6 +7,8 @@ // 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 +// RUN: rm -rf %t.klee-out +// RUN: %klee --output-dir=%t.klee-out --use-merge --debug-log-merge --search=random-path %t.bc 2>&1 | FileCheck %s // CHECK: open merge: // 5 close merges diff --git a/test/Merging/split_merge.c b/test/Merging/split_merge.c index 1f5ebd42..5eedb3b1 100644 --- a/test/Merging/split_merge.c +++ b/test/Merging/split_merge.c @@ -7,6 +7,8 @@ // 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 +// RUN: rm -rf %t.klee-out +// RUN: %klee --output-dir=%t.klee-out --use-merge --debug-log-merge --search=random-path %t.bc 2>&1 | FileCheck %s // CHECK: open merge: |