diff options
author | Frank Busse <bb0xfb@gmail.com> | 2020-10-07 17:46:13 +0100 |
---|---|---|
committer | MartinNowack <2443641+MartinNowack@users.noreply.github.com> | 2020-10-12 11:31:05 +0100 |
commit | b196bd4a9cfc4ae9d582fc3d17c15094287bb36f (patch) | |
tree | 846250ca8f2f983d0caf6cae7f0db269f92a33f9 /lib/Core/Searcher.h | |
parent | 8cb0d545138cbb876318ed6d578b2b6a6a92b81a (diff) | |
download | klee-b196bd4a9cfc4ae9d582fc3d17c15094287bb36f.tar.gz |
Searcher: remove addState/removeState functions
Diffstat (limited to 'lib/Core/Searcher.h')
-rw-r--r-- | lib/Core/Searcher.h | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/lib/Core/Searcher.h b/lib/Core/Searcher.h index 9243b69a..e7f146e0 100644 --- a/lib/Core/Searcher.h +++ b/lib/Core/Searcher.h @@ -62,16 +62,6 @@ namespace klee { os << "<unnamed searcher>\n"; } - // utility functions - - void addState(ExecutionState *es, ExecutionState *current = nullptr) { - update(current, {es}, std::vector<ExecutionState *>()); - } - - void removeState(ExecutionState *es, ExecutionState *current = nullptr) { - update(current, std::vector<ExecutionState *>(), {es}); - } - enum CoreSearchType : std::uint8_t { DFS, BFS, @@ -259,18 +249,18 @@ namespace klee { /// Remove state from the searcher chain, while keeping it in the executor. /// This is used here to 'freeze' a state while it is waiting for other /// states in its merge group to reach the same instruction. - void pauseState(ExecutionState &state){ + void pauseState(ExecutionState &state) { assert(std::find(pausedStates.begin(), pausedStates.end(), &state) == pausedStates.end()); pausedStates.push_back(&state); - baseSearcher->removeState(&state); + baseSearcher->update(nullptr, {}, {&state}); } /// Continue a paused state - void continueState(ExecutionState &state){ + void continueState(ExecutionState &state) { auto it = std::find(pausedStates.begin(), pausedStates.end(), &state); - assert( it != pausedStates.end()); + assert(it != pausedStates.end()); pausedStates.erase(it); - baseSearcher->addState(&state); + baseSearcher->update(nullptr, {&state}, {}); } ExecutionState &selectState() override; |