klee
klee::floats Namespace Reference

Functions

double UInt64AsDouble (uint64_t bits)
 
float UInt64AsFloat (uint64_t bits)
 
uint64_t DoubleAsUInt64 (double d)
 
uint64_t FloatAsUInt64 (float f)
 
uint64_t add (uint64_t l, uint64_t r, unsigned inWidth)
 
uint64_t sub (uint64_t l, uint64_t r, unsigned inWidth)
 
uint64_t mul (uint64_t l, uint64_t r, unsigned inWidth)
 
uint64_t div (uint64_t l, uint64_t r, unsigned inWidth)
 
uint64_t mod (uint64_t l, uint64_t r, unsigned inWidth)
 
bool isNaN (uint64_t l, unsigned inWidth)
 
uint64_t eq (uint64_t l, uint64_t r, unsigned inWidth)
 
uint64_t ne (uint64_t l, uint64_t r, unsigned inWidth)
 
uint64_t lt (uint64_t l, uint64_t r, unsigned inWidth)
 
uint64_t le (uint64_t l, uint64_t r, unsigned inWidth)
 
uint64_t gt (uint64_t l, uint64_t r, unsigned inWidth)
 
uint64_t ge (uint64_t l, uint64_t r, unsigned inWidth)
 
uint64_t trunc (uint64_t l, unsigned outWidth, unsigned inWidth)
 
uint64_t ext (uint64_t l, unsigned outWidth, unsigned inWidth)
 
uint64_t toUnsignedInt (uint64_t l, unsigned outWidth, unsigned inWidth)
 
uint64_t toSignedInt (uint64_t l, unsigned outWidth, unsigned inWidth)
 
uint64_t UnsignedIntToFP (uint64_t l, unsigned outWidth)
 
uint64_t SignedIntToFP (uint64_t l, unsigned outWidth, unsigned inWidth)
 

Variables

const unsigned FLT_BITS = 32
 
const unsigned DBL_BITS = 64
 

Function Documentation

◆ add()

uint64_t klee::floats::add ( uint64_t  l,
uint64_t  r,
unsigned  inWidth 
)
inline

Definition at line 84 of file FloatEvaluation.h.

References DBL_BITS, DoubleAsUInt64(), FloatAsUInt64(), FLT_BITS, klee::bits64::truncateToNBits(), UInt64AsDouble(), and UInt64AsFloat().

Here is the call graph for this function:

◆ div()

uint64_t klee::floats::div ( uint64_t  l,
uint64_t  r,
unsigned  inWidth 
)
inline

Definition at line 111 of file FloatEvaluation.h.

References DBL_BITS, DoubleAsUInt64(), FloatAsUInt64(), FLT_BITS, klee::bits64::truncateToNBits(), UInt64AsDouble(), and UInt64AsFloat().

Here is the call graph for this function:

◆ DoubleAsUInt64()

uint64_t klee::floats::DoubleAsUInt64 ( double  d)
inline

Definition at line 54 of file FloatEvaluation.h.

Referenced by add(), div(), ext(), mod(), mul(), SignedIntToFP(), sub(), and UnsignedIntToFP().

Here is the caller graph for this function:

◆ eq()

uint64_t klee::floats::eq ( uint64_t  l,
uint64_t  r,
unsigned  inWidth 
)
inline

Definition at line 144 of file FloatEvaluation.h.

References DBL_BITS, FLT_BITS, UInt64AsDouble(), and UInt64AsFloat().

Referenced by klee::Executor::replaceReadWithSymbolic().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ext()

uint64_t klee::floats::ext ( uint64_t  l,
unsigned  outWidth,
unsigned  inWidth 
)
inline

Definition at line 212 of file FloatEvaluation.h.

References DoubleAsUInt64(), ext(), klee::bits64::truncateToNBits(), and UInt64AsFloat().

Referenced by ext(), externalsAndGlobalsCheck(), and klee::Executor::terminateStateOnError().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FloatAsUInt64()

uint64_t klee::floats::FloatAsUInt64 ( float  f)
inline

Definition at line 62 of file FloatEvaluation.h.

Referenced by add(), div(), mod(), mul(), SignedIntToFP(), sub(), trunc(), and UnsignedIntToFP().

Here is the caller graph for this function:

◆ ge()

uint64_t klee::floats::ge ( uint64_t  l,
uint64_t  r,
unsigned  inWidth 
)
inline

Definition at line 184 of file FloatEvaluation.h.

References DBL_BITS, FLT_BITS, UInt64AsDouble(), and UInt64AsFloat().

Here is the call graph for this function:

◆ gt()

uint64_t klee::floats::gt ( uint64_t  l,
uint64_t  r,
unsigned  inWidth 
)
inline

Definition at line 176 of file FloatEvaluation.h.

References DBL_BITS, FLT_BITS, UInt64AsDouble(), and UInt64AsFloat().

Here is the call graph for this function:

◆ isNaN()

bool klee::floats::isNaN ( uint64_t  l,
unsigned  inWidth 
)
inline

Definition at line 134 of file FloatEvaluation.h.

References DBL_BITS, FLT_BITS, UInt64AsDouble(), and UInt64AsFloat().

Here is the call graph for this function:

◆ le()

uint64_t klee::floats::le ( uint64_t  l,
uint64_t  r,
unsigned  inWidth 
)
inline

Definition at line 168 of file FloatEvaluation.h.

References DBL_BITS, FLT_BITS, UInt64AsDouble(), and UInt64AsFloat().

Here is the call graph for this function:

◆ lt()

uint64_t klee::floats::lt ( uint64_t  l,
uint64_t  r,
unsigned  inWidth 
)
inline

Definition at line 160 of file FloatEvaluation.h.

References DBL_BITS, FLT_BITS, UInt64AsDouble(), and UInt64AsFloat().

Here is the call graph for this function:

◆ mod()

uint64_t klee::floats::mod ( uint64_t  l,
uint64_t  r,
unsigned  inWidth 
)
inline

Definition at line 120 of file FloatEvaluation.h.

References DBL_BITS, DoubleAsUInt64(), FloatAsUInt64(), FLT_BITS, klee::bits64::truncateToNBits(), UInt64AsDouble(), and UInt64AsFloat().

Here is the call graph for this function:

◆ mul()

uint64_t klee::floats::mul ( uint64_t  l,
uint64_t  r,
unsigned  inWidth 
)
inline

Definition at line 102 of file FloatEvaluation.h.

References DBL_BITS, DoubleAsUInt64(), FloatAsUInt64(), FLT_BITS, klee::bits64::truncateToNBits(), UInt64AsDouble(), and UInt64AsFloat().

Here is the call graph for this function:

◆ ne()

uint64_t klee::floats::ne ( uint64_t  l,
uint64_t  r,
unsigned  inWidth 
)
inline

Definition at line 152 of file FloatEvaluation.h.

References DBL_BITS, FLT_BITS, UInt64AsDouble(), and UInt64AsFloat().

Here is the call graph for this function:

◆ SignedIntToFP()

uint64_t klee::floats::SignedIntToFP ( uint64_t  l,
unsigned  outWidth,
unsigned  inWidth 
)
inline

Definition at line 253 of file FloatEvaluation.h.

References DBL_BITS, DoubleAsUInt64(), FloatAsUInt64(), FLT_BITS, klee::ints::sext(), and klee::bits64::truncateToNBits().

Here is the call graph for this function:

◆ sub()

uint64_t klee::floats::sub ( uint64_t  l,
uint64_t  r,
unsigned  inWidth 
)
inline

Definition at line 93 of file FloatEvaluation.h.

References DBL_BITS, DoubleAsUInt64(), FloatAsUInt64(), FLT_BITS, klee::bits64::truncateToNBits(), UInt64AsDouble(), and UInt64AsFloat().

Referenced by klee::ComputeMultConstants64().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toSignedInt()

uint64_t klee::floats::toSignedInt ( uint64_t  l,
unsigned  outWidth,
unsigned  inWidth 
)
inline

Definition at line 235 of file FloatEvaluation.h.

References DBL_BITS, FLT_BITS, klee::bits64::truncateToNBits(), UInt64AsDouble(), and UInt64AsFloat().

Here is the call graph for this function:

◆ toUnsignedInt()

uint64_t klee::floats::toUnsignedInt ( uint64_t  l,
unsigned  outWidth,
unsigned  inWidth 
)
inline

Definition at line 226 of file FloatEvaluation.h.

References DBL_BITS, FLT_BITS, klee::bits64::truncateToNBits(), UInt64AsDouble(), and UInt64AsFloat().

Here is the call graph for this function:

◆ trunc()

uint64_t klee::floats::trunc ( uint64_t  l,
unsigned  outWidth,
unsigned  inWidth 
)
inline

Definition at line 198 of file FloatEvaluation.h.

References FloatAsUInt64(), trunc(), klee::bits64::truncateToNBits(), and UInt64AsDouble().

Referenced by EqExpr_createPartialR(), klee::IntrinsicCleanerPass::runOnBasicBlock(), and trunc().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UInt64AsDouble()

double klee::floats::UInt64AsDouble ( uint64_t  bits)
inline

Definition at line 32 of file FloatEvaluation.h.

Referenced by add(), div(), eq(), ge(), gt(), isNaN(), le(), lt(), mod(), mul(), ne(), sub(), toSignedInt(), toUnsignedInt(), and trunc().

Here is the caller graph for this function:

◆ UInt64AsFloat()

float klee::floats::UInt64AsFloat ( uint64_t  bits)
inline

Definition at line 40 of file FloatEvaluation.h.

Referenced by add(), div(), eq(), ext(), ge(), gt(), isNaN(), le(), lt(), mod(), mul(), ne(), sub(), toSignedInt(), and toUnsignedInt().

Here is the caller graph for this function:

◆ UnsignedIntToFP()

uint64_t klee::floats::UnsignedIntToFP ( uint64_t  l,
unsigned  outWidth 
)
inline

Definition at line 244 of file FloatEvaluation.h.

References DBL_BITS, DoubleAsUInt64(), FloatAsUInt64(), FLT_BITS, and klee::bits64::truncateToNBits().

Here is the call graph for this function:

Variable Documentation

◆ DBL_BITS

const unsigned klee::floats::DBL_BITS = 64

◆ FLT_BITS

const unsigned klee::floats::FLT_BITS = 32