|
ESBMC
Efficient SMT-based Context-Bounded Model Checker
|
#include <fp_conv.h>
Public Member Functions | |
| fp_convt (smt_solver_baset *_ctx) | |
| virtual | ~fp_convt ()=default |
| virtual smt_astt | mk_smt_fpbv (const ieee_floatt &thereal) |
| Create a floating point bitvector. | |
| virtual smt_sortt | mk_fpbv_sort (const unsigned ew, const unsigned sw) |
| Create a sort representing a floating-point number. | |
| virtual smt_sortt | mk_fpbv_rm_sort () |
| Create a sort representing a floating-point rounding mode. | |
| virtual smt_astt | mk_smt_fpbv_nan (bool sgn, unsigned ew, unsigned sw) |
| Create a NaN floating point bitvector. | |
| virtual smt_astt | mk_smt_fpbv_inf (bool sgn, unsigned ew, unsigned sw) |
| Create a (+/-)inf floating point bitvector. | |
| virtual smt_astt | mk_smt_fpbv_rm (ieee_floatt::rounding_modet rm) |
| Create a rounding mode to be used by floating point cast and arith ops. | |
| virtual smt_astt | mk_smt_typecast_from_fpbv_to_ubv (smt_astt from, std::size_t width) |
| Typecast from a floating point. | |
| virtual smt_astt | mk_smt_typecast_from_fpbv_to_sbv (smt_astt from, std::size_t width) |
| Typecast from a floating point. | |
| virtual smt_astt | mk_smt_typecast_from_fpbv_to_fpbv (smt_astt from, smt_sortt to, smt_astt rm) |
| Typecast from a floating point. | |
| virtual smt_astt | mk_smt_typecast_ubv_to_fpbv (smt_astt from, smt_sortt to, smt_astt rm) |
| Typecast to a floating point. | |
| virtual smt_astt | mk_smt_typecast_sbv_to_fpbv (smt_astt from, smt_sortt to, smt_astt rm) |
| Typecast to a floating point. | |
| virtual smt_astt | mk_smt_nearbyint_from_float (smt_astt from, smt_astt rm) |
| Calculate the nearby int from a floating point, considering the rounding mode. | |
| virtual smt_astt | mk_smt_fpbv_add (smt_astt lhs, smt_astt rhs, smt_astt rm) |
| Convert a ieee addition. | |
| virtual smt_astt | mk_smt_fpbv_sub (smt_astt lhs, smt_astt rhs, smt_astt rm) |
| Convert a ieee subtraction. | |
| virtual smt_astt | mk_smt_fpbv_mul (smt_astt lhs, smt_astt rhs, smt_astt rm) |
| Convert a ieee multiplication. | |
| virtual smt_astt | mk_smt_fpbv_div (smt_astt lhs, smt_astt rhs, smt_astt rm) |
| Convert the ieee division. | |
| virtual smt_astt | mk_smt_fpbv_rem (smt_astt lhs, smt_astt rhs) |
| Convert the ieee remainder (SMT-LIB fp.rem, C's remainder()). | |
| virtual smt_astt | mk_smt_fpbv_sqrt (smt_astt rd, smt_astt rm) |
| Convert the ieee arithmetic square-root (sqrt). | |
| virtual smt_astt | mk_smt_fpbv_fma (smt_astt v1, smt_astt v2, smt_astt v3, smt_astt rm) |
| Convert the ieee arithmetic fused-multiply add (fma): round((v1 * v2) + v3). | |
| virtual smt_astt | mk_smt_fpbv_eq (smt_astt lhs, smt_astt rhs) |
| Convert an ieee equality. | |
| virtual smt_astt | mk_smt_fpbv_gt (smt_astt lhs, smt_astt rhs) |
| Convert an ieee greater than. | |
| virtual smt_astt | mk_smt_fpbv_lt (smt_astt lhs, smt_astt rhs) |
| Convert an ieee less than. | |
| virtual smt_astt | mk_smt_fpbv_gte (smt_astt lhs, smt_astt rhs) |
| Convert an ieee greater than or equal. | |
| virtual smt_astt | mk_smt_fpbv_lte (smt_astt lhs, smt_astt rhs) |
| Convert an ieee less than or equal. | |
| virtual smt_astt | mk_smt_fpbv_is_nan (smt_astt op) |
| Convert an ieee is_nan operation. | |
| virtual smt_astt | mk_smt_fpbv_is_inf (smt_astt op) |
| Convert an ieee is_inf operation. | |
| virtual smt_astt | mk_smt_fpbv_is_normal (smt_astt op) |
| Convert an ieee is_normal operation. | |
| virtual smt_astt | mk_smt_fpbv_is_zero (smt_astt op) |
| Convert an ieee is_zero operation. | |
| virtual smt_astt | mk_smt_fpbv_is_negative (smt_astt op) |
| Convert an ieee is_neg operation. | |
| virtual smt_astt | mk_smt_fpbv_is_positive (smt_astt op) |
| Convert an ieee is_pos operation. | |
| virtual smt_astt | mk_smt_fpbv_abs (smt_astt op) |
| Convert an ieee abs operation. | |
| virtual smt_astt | mk_smt_fpbv_neg (smt_astt op) |
| Convert an ieee negation operation. | |
| virtual ieee_floatt | get_fpbv (smt_astt a) |
| Extract the assignment to a floating-point from the SMT solvers model. | |
| virtual smt_astt | mk_from_bv_to_fp (smt_astt op, smt_sortt to) |
| Convert BV to FP. | |
| virtual smt_astt | mk_from_fp_to_bv (smt_astt op) |
| Convert FP to BV. | |
|
explicit |
|
virtualdefault |
|
virtual |
Extract the assignment to a floating-point from the SMT solvers model.
| a | the AST whos value we wish to know. |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
|
virtual |
Create a sort representing a floating-point rounding mode.
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
|
virtual |
Create a sort representing a floating-point number.
| ew | Exponent width, in bits, of the bitvector to create. |
| sw | Significand width, in bits, of the bitvector to create. |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
Convert BV to FP.
| op | the bitvector |
| to | the floating-point type |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
Convert FP to BV.
| op | the floating-point |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
|
virtual |
Create a floating point bitvector.
| thereal | the floating-point number |
| ew | Exponent width, in bits, of the bitvector to create. |
| sw | Significand width, in bits, of the bitvector to create. |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
Convert an ieee abs operation.
| op | the operand |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
Convert a ieee addition.
| lhs | left hand side of the addition |
| rhs | right hand side of the addition |
| rm | the rounding mode |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
Convert the ieee division.
| lhs | left hand side of the division |
| rhs | right hand side of the division |
| rm | the rounding mode |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
Convert an ieee equality.
| lhs | left hand side |
| rhs | right hand side |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
Convert the ieee arithmetic fused-multiply add (fma): round((v1 * v2) + v3).
| v1 | in the equation |
| v2 | in the equation |
| v3 | in the equation |
| rm | the rounding mode |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
Convert an ieee greater than.
| lhs | left hand side |
| rhs | right hand side |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, and z3_convt.
Convert an ieee greater than or equal.
| lhs | left hand side |
| rhs | right hand side |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, and z3_convt.
Create a (+/-)inf floating point bitvector.
| sgn | Whether this bitvector is negative or positive. |
| ew | Exponent width, in bits, of the bitvector to create. |
| sw | Significand width, in bits, of the bitvector to create. |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
Convert an ieee is_inf operation.
| op | the operand |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
Convert an ieee is_nan operation.
| op | the operand |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
Convert an ieee is_neg operation.
| op | the operand |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
Convert an ieee is_normal operation.
| op | the operand |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
Convert an ieee is_pos operation.
| op | the operand |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
Convert an ieee is_zero operation.
| op | the operand |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
Convert an ieee less than.
| lhs | left hand side |
| rhs | right hand side |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
Convert an ieee less than or equal.
| lhs | left hand side |
| rhs | right hand side |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
Convert a ieee multiplication.
| lhs | left hand side of the multiplication |
| rhs | right hand side of the multiplication |
| rm | the rounding mode |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
Create a NaN floating point bitvector.
| ew | Exponent width, in bits, of the bitvector to create. |
| sw | Significand width, in bits, of the bitvector to create. |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
Convert an ieee negation operation.
| op | the operand |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
Convert the ieee remainder (SMT-LIB fp.rem, C's remainder()).
The operation is exact, so it takes no rounding mode.
| lhs | left hand side of the remainder |
| rhs | right hand side of the remainder |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
|
virtual |
Create a rounding mode to be used by floating point cast and arith ops.
| rm | the kind of rounding mode |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
Convert the ieee arithmetic square-root (sqrt).
| op | the sqrt radicand |
| rm | the rounding mode |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
Convert a ieee subtraction.
| lhs | left hand side of the subtraction |
| rhs | right hand side of the subtraction |
| rm | the rounding mode |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
Calculate the nearby int from a floating point, considering the rounding mode.
| from | the floating-point |
| rm | the rounding mode |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
|
virtual |
Typecast from a floating point.
| from | the floating point being casted to floating-point |
| to | the floating-point resulting type |
| rm | the rounding mode |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
Typecast from a floating point.
| from | the floating point being casted to signed bitvector |
| to | the signed bitvector resulting type |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
Typecast from a floating point.
| from | the floating point being casted to unsigned bitvector |
| to | the unsigned bitvector resulting type |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
Typecast to a floating point.
| from | the signed bitvector being casted to a floating-point |
| cast | the floating-point resulting type |
| rm | the rounding mode |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.
Typecast to a floating point.
| from | the unsigned bitvector being casted to a floating-point |
| cast | the floating-point resulting type |
| rm | the rounding mode |
Reimplemented in bitwuzla_convt, cvc5_convt, cvc_convt, mathsat_convt, and z3_convt.