diff options
author | Cristian Cadar <c.cadar@imperial.ac.uk> | 2016-11-19 20:31:40 +0000 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2016-11-19 20:31:40 +0000 |
commit | 30682e4b5171e3d32deea0400b1e706fc68e6775 (patch) | |
tree | 016950d40e4035e8b9a2aa5495acef653c78c3b0 /lib | |
parent | 1eed21e1f4c374ea6d90734f4fcf32062438cc8a (diff) | |
parent | 2b2b2b0e46ae260e7974f0d2738f2d23ca255874 (diff) | |
download | klee-30682e4b5171e3d32deea0400b1e706fc68e6775.tar.gz |
Merge branch 'fix_bfs2' of https://github.com/MartinNowack/klee into MartinNowack-fix_bfs2
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Core/Searcher.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Core/Searcher.cpp b/lib/Core/Searcher.cpp index 47f300d1..c787382f 100644 --- a/lib/Core/Searcher.cpp +++ b/lib/Core/Searcher.cpp @@ -104,6 +104,16 @@ ExecutionState &BFSSearcher::selectState() { void BFSSearcher::update(ExecutionState *current, const std::vector<ExecutionState *> &addedStates, const std::vector<ExecutionState *> &removedStates) { + // Assumption: If new states were added KLEE forked, therefore states evolved. + // constraints were added to the current state, it evolved. + if (!addedStates.empty() && current && + std::find(removedStates.begin(), removedStates.end(), current) == + removedStates.end()) { + assert(states.front() == current); + states.pop_front(); + states.push_back(current); + } + states.insert(states.end(), addedStates.begin(), addedStates.end()); |