about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorDaniel Schemmel <daniel@schemmel.net>2023-03-23 21:45:00 +0000
committerCristian Cadar <c.cadar@imperial.ac.uk>2023-04-20 19:50:07 +0100
commit270ced85122f8f70e1847488bd333bd808721473 (patch)
treee6bdeb25fab46937730e89c4e4352a9b24220d23
parent46ea4a471f105ac24537706f021459de5b740319 (diff)
downloadklee-270ced85122f8f70e1847488bd333bd808721473.tar.gz
remove unused rng adaptor functions
-rw-r--r--include/klee/ADT/RNG.h7
-rw-r--r--lib/Support/RNG.cpp24
-rw-r--r--unittests/RNG/RNGTest.cpp5
3 files changed, 0 insertions, 36 deletions
diff --git a/include/klee/ADT/RNG.h b/include/klee/ADT/RNG.h
index fc08e3b8..1e7a1682 100644
--- a/include/klee/ADT/RNG.h
+++ b/include/klee/ADT/RNG.h
@@ -19,17 +19,10 @@ namespace klee {
 
     /* generates a random number on [0,0xffffffff]-interval */
     unsigned int getInt32();
-    /* generates a random number on [0,0x7fffffff]-interval */
-    int getInt31();
-    /* generates a random number on [0,1]-real-interval */
-    double getDoubleLR();
-    float getFloatLR();
     /* generates a random number on [0,1)-real-interval */
     double getDoubleL();
-    float getFloatL();
     /* generates a random number on (0,1)-real-interval */
     double getDouble();
-    float getFloat();
     /* generators a random flop */
     bool getBool();
   };
diff --git a/lib/Support/RNG.cpp b/lib/Support/RNG.cpp
index 2cdcedf5..1523e123 100644
--- a/lib/Support/RNG.cpp
+++ b/lib/Support/RNG.cpp
@@ -30,17 +30,6 @@ unsigned int RNG::getInt32() {
   return (*this)();
 }
 
-/* generates a random number on [0,0x7fffffff]-interval */
-int RNG::getInt31() {
-  return (int)(getInt32() >> 1U);
-}
-
-/* generates a random number on [0,1]-real-interval */
-double RNG::getDoubleLR() {
-  return getInt32()*(1.0/4294967295.0); 
-  /* divided by 2^32-1 */ 
-}
-
 /* generates a random number on [0,1)-real-interval */
 double RNG::getDoubleL() {
   return getInt32()*(1.0/4294967296.0); 
@@ -53,19 +42,6 @@ double RNG::getDouble() {
   /* divided by 2^32 */
 }
 
-float RNG::getFloatLR() {
-  return getInt32()*(1.0f/4294967295.0f); 
-  /* divided by 2^32-1 */ 
-}
-float RNG::getFloatL() {
-  return getInt32()*(1.0f/4294967296.0f); 
-  /* divided by 2^32 */
-}
-float RNG::getFloat() {
-  return (getInt32() + 0.5f)*(1.0f/4294967296.0f); 
-  /* divided by 2^32 */
-}
-
 bool RNG::getBool() {
   unsigned bits = getInt32();
   bits ^= bits >> 16U;
diff --git a/unittests/RNG/RNGTest.cpp b/unittests/RNG/RNGTest.cpp
index 218a15a7..4dee36d1 100644
--- a/unittests/RNG/RNGTest.cpp
+++ b/unittests/RNG/RNGTest.cpp
@@ -10,14 +10,9 @@ TEST(RNG, InitialSeedEquality) {
   RNG seed(5489U);
 
   ASSERT_EQ(noseed.getBool(), seed.getBool());
-  ASSERT_EQ(noseed.getInt31(), seed.getInt31());
   ASSERT_EQ(noseed.getInt32(), seed.getInt32());
   ASSERT_EQ(noseed.getDouble(), seed.getDouble());
   ASSERT_EQ(noseed.getDoubleL(), seed.getDoubleL());
-  ASSERT_EQ(noseed.getDoubleLR(), seed.getDoubleLR());
-  ASSERT_EQ(noseed.getFloat(), seed.getFloat());
-  ASSERT_EQ(noseed.getFloatL(), seed.getFloatL());
-  ASSERT_EQ(noseed.getFloatLR(), seed.getFloatLR());
 }