aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorFrank Busse <bb0xfb@gmail.com>2020-06-25 21:35:25 +0100
committerCristian Cadar <c.cadar@imperial.ac.uk>2020-07-30 16:44:31 +0100
commit661fba88fff0205ea258a1149907f2822458cd83 (patch)
treef9bc1fb96d55d55312dd10b19a0cf94a7ebe89e7 /include
parent169022a56d62cdb2f15540a0c592c5f90fdb39cb (diff)
downloadklee-661fba88fff0205ea258a1149907f2822458cd83.tar.gz
introduce --rng-initial-seed=<unsigned>
* move global theRNG into Executor * pass theRNG via ctor to searchers * remove some type warnings from RNG.cpp Fixes #1023.
Diffstat (limited to 'include')
-rw-r--r--include/klee/ADT/RNG.h12
-rw-r--r--include/klee/Support/OptionCategories.h1
2 files changed, 8 insertions, 5 deletions
diff --git a/include/klee/ADT/RNG.h b/include/klee/ADT/RNG.h
index 5ea375b5..1c8eed15 100644
--- a/include/klee/ADT/RNG.h
+++ b/include/klee/ADT/RNG.h
@@ -19,16 +19,18 @@ namespace klee {
static const unsigned int MATRIX_A = 0x9908b0dfUL; /* constant vector a */
static const unsigned int UPPER_MASK = 0x80000000UL; /* most significant w-r bits */
static const unsigned int LOWER_MASK = 0x7fffffffUL; /* least significant r bits */
-
+
private:
unsigned int mt[N]; /* the array for the state vector */
int mti;
-
+
public:
- RNG(unsigned int seed=5489UL);
-
+ RNG();
+ explicit RNG(unsigned int seed);
+
+ /* set seed value */
void seed(unsigned int seed);
-
+
/* generates a random number on [0,0xffffffff]-interval */
unsigned int getInt32();
/* generates a random number on [0,0x7fffffff]-interval */
diff --git a/include/klee/Support/OptionCategories.h b/include/klee/Support/OptionCategories.h
index 4fb7e5cb..40f3deb8 100644
--- a/include/klee/Support/OptionCategories.h
+++ b/include/klee/Support/OptionCategories.h
@@ -19,6 +19,7 @@
namespace klee {
extern llvm::cl::OptionCategory DebugCat;
extern llvm::cl::OptionCategory MergeCat;
+ extern llvm::cl::OptionCategory MiscCat;
extern llvm::cl::OptionCategory ModuleCat;
extern llvm::cl::OptionCategory SeedingCat;
extern llvm::cl::OptionCategory SolvingCat;