diff options
Diffstat (limited to 'lib/Core/Searcher.cpp')
-rw-r--r-- | lib/Core/Searcher.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/Core/Searcher.cpp b/lib/Core/Searcher.cpp index 765784c5..d6cf8dfd 100644 --- a/lib/Core/Searcher.cpp +++ b/lib/Core/Searcher.cpp @@ -41,10 +41,6 @@ using namespace klee; using namespace llvm; -namespace klee { - extern RNG theRNG; -} - Searcher::~Searcher() { } @@ -166,9 +162,10 @@ RandomSearcher::update(ExecutionState *current, /// -WeightedRandomSearcher::WeightedRandomSearcher(WeightType _type) +WeightedRandomSearcher::WeightedRandomSearcher(WeightType type, RNG &rng) : states(new DiscretePDF<ExecutionState*>()), - type(_type) { + theRNG{rng}, + type(type) { switch(type) { case Depth: case RP: @@ -261,8 +258,10 @@ bool WeightedRandomSearcher::empty() { return states->empty(); } -RandomPathSearcher::RandomPathSearcher(PTree &_processTree) - : processTree(_processTree), idBitMask(_processTree.getNextId()) {} +/// +RandomPathSearcher::RandomPathSearcher(PTree &processTree, RNG &rng) + : processTree{processTree}, theRNG{rng}, idBitMask{processTree.getNextId()} { +} RandomPathSearcher::~RandomPathSearcher() { } |