about summary refs log tree commit diff homepage
path: root/lib/Core/UserSearcher.cpp
diff options
context:
space:
mode:
authorAndrea Mattavelli <andreamattavelli@gmail.com>2017-10-09 15:37:14 +0100
committerCristian Cadar <c.cadar@imperial.ac.uk>2017-10-09 19:49:45 +0100
commit9f11eababd767b012b623806b40fa0647affa47e (patch)
tree17b178c0f0cc2b37f7069999becd4a80dd20caa3 /lib/Core/UserSearcher.cpp
parent085a119d95af224f96ef7ecb2a8f614f5552e321 (diff)
downloadklee-9f11eababd767b012b623806b40fa0647affa47e.tar.gz
Fixed initialization of distance to uncovered instructions when KLEE relies on default searchers
Diffstat (limited to 'lib/Core/UserSearcher.cpp')
-rw-r--r--lib/Core/UserSearcher.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/Core/UserSearcher.cpp b/lib/Core/UserSearcher.cpp
index 4275f3a5..6158f722 100644
--- a/lib/Core/UserSearcher.cpp
+++ b/lib/Core/UserSearcher.cpp
@@ -55,6 +55,14 @@ namespace {
 }
 
 
+void klee::initializeSearchOptions() {
+  // default values
+  if (CoreSearch.empty()) {
+    CoreSearch.push_back(Searcher::RandomPath);
+    CoreSearch.push_back(Searcher::NURS_CovNew);
+  }
+}
+
 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() ||
@@ -84,12 +92,6 @@ Searcher *getNewSearcher(Searcher::CoreSearchType type, Executor &executor) {
 
 Searcher *klee::constructUserSearcher(Executor &executor) {
 
-  // default values
-  if (CoreSearch.size() == 0) {
-    CoreSearch.push_back(Searcher::RandomPath);
-    CoreSearch.push_back(Searcher::NURS_CovNew);
-  }
-
   Searcher *searcher = getNewSearcher(CoreSearch[0], executor);
   
   if (CoreSearch.size() > 1) {