about summary refs log tree commit diff homepage
path: root/lib/Core/UserSearcher.cpp
diff options
context:
space:
mode:
authorHoang M. Le <hle@informatik.uni-bremen.de>2016-11-08 18:25:45 +0100
committerHoang M. Le <hle@informatik.uni-bremen.de>2016-11-08 18:25:45 +0100
commit3fdd9a903837a6750e42fd6d7ada342def63a7b3 (patch)
treeb44da5dff5d19f7b8560b7730a7c16339edb87dd /lib/Core/UserSearcher.cpp
parente853f0bceeb7099acc3df16e52a3cfd1dabad422 (diff)
downloadklee-3fdd9a903837a6750e42fd6d7ada342def63a7b3.tar.gz
add nicer error messages for --use-merge and add explanation why it currently cannot be used with random-path
Diffstat (limited to 'lib/Core/UserSearcher.cpp')
-rw-r--r--lib/Core/UserSearcher.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Core/UserSearcher.cpp b/lib/Core/UserSearcher.cpp
index fcda26f2..0aa4a4b0 100644
--- a/lib/Core/UserSearcher.cpp
+++ b/lib/Core/UserSearcher.cpp
@@ -117,8 +117,12 @@ Searcher *klee::constructUserSearcher(Executor &executor) {
 
   // merge support is experimental
   if (UseMerge) {
-    assert(!UseBumpMerge);
-    assert(std::find(CoreSearch.begin(), CoreSearch.end(), Searcher::RandomPath) == CoreSearch.end()); // XXX: needs further debugging: test/Features/Searchers.c fails with this searcher
+    if (UseBumpMerge)
+      klee_error("use-merge and use-bump-merge cannot be used together");
+    // RandomPathSearcher cannot be used in conjunction with MergingSearcher,
+    // see MergingSearcher::selectState() for explanation.
+    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");
     searcher = new MergingSearcher(executor, searcher);
   } else if (UseBumpMerge) {
     searcher = new BumpMergingSearcher(executor, searcher);