Generates string constraints for functions generating strings from other types, in particular int, long, float, double, char, bool. More...
#include "string_constraint_generator.h"#include <util/bitvector_expr.h>#include <util/floatbv_expr.h>#include <util/ieee_float.h>#include <util/mathematical_expr.h>Go to the source code of this file.
Generates string constraints for functions generating strings from other types, in particular int, long, float, double, char, bool.
Definition in file string_constraint_generator_float.cpp.
Create an expression to represent a float or double value.
Definition at line 78 of file string_constraint_generator_float.cpp.
Estimate the decimal exponent that should be used to represent a given floating point value in decimal.
We are looking for \(d\) such that \(n * 10^d = m * 2^e\), so: \(d = log_10(m) + log_10(2) * e - log_10(n)\) m – the fraction – should be between 1 and 2 so log_10(m) in [0,log_10(2)]. n – the fraction in base 10 – should be between 1 and 10 so log_10(n) in [0, 1]. So the estimate is given by: d ~=~ floor(log_10(2) * e)
Definition at line 141 of file string_constraint_generator_float.cpp.
Multiplication of expressions representing floating points.
Note that the rounding mode is set to ROUND_TO_EVEN.
Definition at line 105 of file string_constraint_generator_float.cpp.
Convert integers to floating point to be used in operations with other values that are in floating point representation.
Definition at line 122 of file string_constraint_generator_float.cpp.
Gets the unbiased exponent in a floating-point bit-vector.
Definition at line 29 of file string_constraint_generator_float.cpp.
Gets the fraction without hidden bit.
Definition at line 44 of file string_constraint_generator_float.cpp.
Gets the significand as a java integer, looking for the hidden bit.
Since the most significant bit is 1 for normalized number, it is not part of the encoding of the significand and is 0 only if all the bits of the exponent are 0, that is why it is called the hidden bit.
Definition at line 59 of file string_constraint_generator_float.cpp.
Round a float expression to an integer closer to 0.
Definition at line 93 of file string_constraint_generator_float.cpp.