1#ifndef _ESBMC_SOLVERS_MATHSAT_MATHSAT_CONV_H_
2#define _ESBMC_SOLVERS_MATHSAT_MATHSAT_CONV_H_
14 void dump()
const override;
80 const std::string &name,
81 const std::vector<smt_astt> &args,
84 const std::string &name,
array_iface(bool _b, bool inf)
Definition smt_array.h:14
fp_convt(smt_solver_baset *_ctx)
Definition fp_conv.cpp:26
Definition ieee_float.h:75
rounding_modet
Definition ieee_float.h:78
smt_astt mk_bvsle(smt_astt a, smt_astt b) override
Definition mathsat_conv.cpp:576
smt_astt mk_add(smt_astt a, smt_astt b) override
Definition mathsat_conv.cpp:210
std::string dump_smt() override
Method to dump the SMT formula.
Definition mathsat_conv.cpp:968
smt_astt mk_smt_fpbv_lte(smt_astt lhs, smt_astt rhs) override
Convert an ieee less than or equal.
Definition mathsat_conv.cpp:1380
smt_astt mk_smt_fpbv_is_zero(smt_astt op) override
Convert an ieee is_zero operation.
Definition mathsat_conv.cpp:1442
smt_astt mk_from_bv_to_fp(smt_astt op, smt_sortt to) override
Convert BV to FP.
Definition mathsat_conv.cpp:1134
smt_astt mk_smt_fpbv_rm(ieee_floatt::rounding_modet rm) override
Create a rounding mode to be used by floating point cast and arith ops.
Definition mathsat_conv.cpp:737
smt_astt mk_neg(smt_astt a) override
Definition mathsat_conv.cpp:380
smt_astt mk_bvxor(smt_astt a, smt_astt b) override
Definition mathsat_conv.cpp:405
smt_astt mk_smt_fpbv_is_negative(smt_astt op) override
Convert an ieee is_neg operation.
Definition mathsat_conv.cpp:1454
smt_astt mk_and(smt_astt a, smt_astt b) override
Definition mathsat_conv.cpp:495
smt_astt mk_smt_typecast_from_fpbv_to_ubv(smt_astt from, std::size_t width) override
Typecast from a floating point.
Definition mathsat_conv.cpp:1160
smt_astt mk_smt_fpbv_div(smt_astt lhs, smt_astt rhs, smt_astt rm) override
Convert the ieee division.
Definition mathsat_conv.cpp:1337
void pop_ctx() override
Pop one context on the SMT assertion stack.
Definition mathsat_conv.cpp:74
smt_astt mk_smt_fpbv_is_inf(smt_astt op) override
Convert an ieee is_inf operation.
Definition mathsat_conv.cpp:1418
smt_astt mk_store(smt_astt a, smt_astt b, smt_astt c) override
Definition mathsat_conv.cpp:608
smt_astt mk_bvneg(smt_astt a) override
Definition mathsat_conv.cpp:391
smt_astt mk_smt_typecast_from_fpbv_to_sbv(smt_astt from, std::size_t width) override
Typecast from a floating point.
Definition mathsat_conv.cpp:1184
void print_model() override
Method to print the SMT model.
Definition mathsat_conv.cpp:1039
smt_sortt mk_bvfp_sort(std::size_t ew, std::size_t sw) override
Create a floating-point sort, using bitvectors.
Definition mathsat_conv.cpp:1082
smt_astt mk_bvsub(smt_astt a, smt_astt b) override
Definition mathsat_conv.cpp:250
smt_astt mk_eq(smt_astt a, smt_astt b) override
Definition mathsat_conv.cpp:589
smt_astt mk_mul(smt_astt a, smt_astt b) override
Definition mathsat_conv.cpp:263
smt_astt convert_array_of(smt_astt init_val, unsigned long domain_width) override
Create an array with a single initializer.
Definition mathsat_conv.cpp:922
smt_astt mk_select(smt_astt a, smt_astt b) override
Definition mathsat_conv.cpp:624
smt_sortt mk_real_sort() override
Create a real sort.
Definition mathsat_conv.cpp:1100
smt_astt mk_le(smt_astt a, smt_astt b) override
Definition mathsat_conv.cpp:551
smt_astt mk_smt_fpbv_is_positive(smt_astt op) override
Convert an ieee is_pos operation.
Definition mathsat_conv.cpp:1466
mathsat_convt(const namespacet &ns, const optionst &options)
Definition mathsat_conv.cpp:52
tvt get_bool(smt_astt a) override
Extract the assignment to a boolean variable from the SMT solver's model.
Definition mathsat_conv.cpp:100
smt_astt mk_bvudiv(smt_astt a, smt_astt b) override
Definition mathsat_conv.cpp:328
smt_astt mk_smt_fpbv(const ieee_floatt &thereal) override
Create a floating point bitvector.
Definition mathsat_conv.cpp:672
smt_astt mk_bvnot(smt_astt a) override
Definition mathsat_conv.cpp:398
smt_astt mk_bvmul(smt_astt a, smt_astt b) override
Definition mathsat_conv.cpp:276
smt_astt mk_smt_fpbv_sqrt(smt_astt rd, smt_astt rm) override
Convert the ieee arithmetic square-root (sqrt).
Definition mathsat_conv.cpp:1278
smt_astt mk_bvult(smt_astt a, smt_astt b) override
Definition mathsat_conv.cpp:525
smt_astt mk_bvshl(smt_astt a, smt_astt b) override
Definition mathsat_conv.cpp:341
smt_astt mk_bvule(smt_astt a, smt_astt b) override
Definition mathsat_conv.cpp:563
smt_astt mk_smt_bv(const BigInt &theint, smt_sortt s) override
Create a bitvector.
Definition mathsat_conv.cpp:658
smt_astt mk_ite(smt_astt cond, smt_astt t, smt_astt f) override
Create an ite operation.
Definition mathsat_conv.cpp:878
smt_astt mk_bvashr(smt_astt a, smt_astt b) override
Definition mathsat_conv.cpp:354
smt_astt mk_smt_fpbv_is_nan(smt_astt op) override
Convert an ieee is_nan operation.
Definition mathsat_conv.cpp:1406
smt_astt mk_array_symbol(const std::string &name, const smt_sort *s, smt_sortt array_subtype) override
Definition mathsat_conv.cpp:771
smt_astt mk_not(smt_astt a) override
Definition mathsat_conv.cpp:506
smt_astt mk_smt_fpbv_nan(bool sgn, unsigned ew, unsigned sw) override
Create a NaN floating point bitvector.
Definition mathsat_conv.cpp:706
smt_astt mk_smt_fpbv_neg(smt_astt op) override
Convert an ieee negation operation.
Definition mathsat_conv.cpp:1394
smt_astt mk_smt_int(const BigInt &theint) override
Create an integer smt_ast.
Definition mathsat_conv.cpp:636
smt_sortt mk_bvfp_rm_sort() override
Create a floating-point rounding mode sort, using bitvectors.
Definition mathsat_conv.cpp:1088
smt_astt mk_sign_ext(smt_astt a, unsigned int topwidth) override
Given a signed, upwards cast, extends the sign of the given AST to the desired length.
Definition mathsat_conv.cpp:843
smt_resultt dec_solve() override
Solve the formula given to the solver.
Definition mathsat_conv.cpp:86
smt_astt mk_smt_real(const std::string &str) override
Create a real in a smt_ast.
Definition mathsat_conv.cpp:649
smt_sortt mk_array_sort(smt_sortt domain, smt_sortt range) override
Create an array sort.
Definition mathsat_conv.cpp:1124
void check_msat_error(msat_term &r) const
Definition mathsat_conv.cpp:29
smt_astt mk_smt_typecast_sbv_to_fpbv(smt_astt from, smt_sortt to, smt_astt rm) override
Typecast to a floating point.
Definition mathsat_conv.cpp:1246
void assert_ast(smt_astt a) override
Assert the truth of an ast.
Definition mathsat_conv.cpp:80
smt_astt mk_concat(smt_astt a, smt_astt b) override
Concatenate two smt expressions.
Definition mathsat_conv.cpp:865
smt_astt mk_smt_typecast_from_fpbv_to_fpbv(smt_astt from, smt_sortt to, smt_astt rm) override
Typecast from a floating point.
Definition mathsat_conv.cpp:1208
ieee_floatt get_fpbv(smt_astt a) override
Extract the assignment to a floating-point from the SMT solvers model.
Definition mathsat_conv.cpp:147
const std::string solver_text() override
Solver name fetcher.
Definition mathsat_conv.cpp:201
smt_astt mk_bvslt(smt_astt a, smt_astt b) override
Definition mathsat_conv.cpp:538
smt_sortt mk_int_sort() override
Create a int sort.
Definition mathsat_conv.cpp:1106
void push_ctx() override
Push one context on the SMT assertion stack.
Definition mathsat_conv.cpp:68
smt_sortt mk_fbv_sort(std::size_t width) override
Create a fixed-point sort.
Definition mathsat_conv.cpp:1118
smt_astt mk_bvumod(smt_astt a, smt_astt b) override
Definition mathsat_conv.cpp:302
smt_astt mk_smt_fpbv_rem(smt_astt lhs, smt_astt rhs) override
Convert the ieee remainder (SMT-LIB fp.rem, C's remainder()).
Definition mathsat_conv.cpp:1025
smt_astt mk_from_fp_to_bv(smt_astt op) override
Convert FP to BV.
Definition mathsat_conv.cpp:1149
smt_astt mk_bvor(smt_astt a, smt_astt b) override
Definition mathsat_conv.cpp:418
smt_astt mk_smt_fpbv_sub(smt_astt lhs, smt_astt rhs, smt_astt rm) override
Convert a ieee subtraction.
Definition mathsat_conv.cpp:1307
smt_astt mk_bvadd(smt_astt a, smt_astt b) override
Definition mathsat_conv.cpp:223
BigInt get_bv(smt_astt a, bool is_signed) override
Extract the assignment to a bitvector from the SMT solver's model.
Definition mathsat_conv.cpp:122
smt_astt mk_bvlshr(smt_astt a, smt_astt b) override
Definition mathsat_conv.cpp:367
smt_astt mk_smt_symbol(const std::string &name, const smt_sort *s) override
Definition mathsat_conv.cpp:780
smt_astt mk_lt(smt_astt a, smt_astt b) override
Definition mathsat_conv.cpp:513
smt_astt mk_smt_fpbv_mul(smt_astt lhs, smt_astt rhs, smt_astt rm) override
Convert a ieee multiplication.
Definition mathsat_conv.cpp:1322
smt_sortt mk_bv_sort(std::size_t width) override
Create a bv sort.
Definition mathsat_conv.cpp:1112
smt_sortt mk_fpbv_sort(const unsigned ew, const unsigned sw) override
Create a sort representing a floating-point number.
Definition mathsat_conv.cpp:1064
smt_sortt mk_bool_sort() override
Create a bool sort.
Definition mathsat_conv.cpp:1094
smt_astt mk_smt_fpbv_is_normal(smt_astt op) override
Convert an ieee is_normal operation.
Definition mathsat_conv.cpp:1430
smt_astt mk_smt_fpbv_lt(smt_astt lhs, smt_astt rhs) override
Convert an ieee less than.
Definition mathsat_conv.cpp:1366
msat_env env
Definition mathsat_conv.h:154
smt_sortt mk_fpbv_rm_sort() override
Create a sort representing a floating-point rounding mode.
Definition mathsat_conv.cpp:1073
smt_astt mk_bvsmod(smt_astt a, smt_astt b) override
Definition mathsat_conv.cpp:289
smt_astt mk_sub(smt_astt a, smt_astt b) override
Definition mathsat_conv.cpp:236
bool use_fp_api
Definition mathsat_conv.h:158
smt_astt mk_smt_bool(bool val) override
Create a boolean.
Definition mathsat_conv.cpp:765
smt_astt mk_smt_fpbv_add(smt_astt lhs, smt_astt rhs, smt_astt rm) override
Convert a ieee addition.
Definition mathsat_conv.cpp:1292
smt_astt mk_bvand(smt_astt a, smt_astt b) override
Definition mathsat_conv.cpp:431
smt_astt mk_smt_fpbv_fma(smt_astt v1, smt_astt v2, smt_astt v3, smt_astt rm) override
Convert the ieee arithmetic fused-multiply add (fma): round((v1 * v2) + v3).
Definition mathsat_conv.cpp:982
smt_astt mk_smt_typecast_ubv_to_fpbv(smt_astt from, smt_sortt to, smt_astt rm) override
Typecast to a floating point.
Definition mathsat_conv.cpp:1227
smt_astt mk_xor(smt_astt a, smt_astt b) override
Definition mathsat_conv.cpp:458
~mathsat_convt() override
Definition mathsat_conv.cpp:63
smt_astt mk_implies(smt_astt a, smt_astt b) override
Definition mathsat_conv.cpp:444
smt_astt mk_smt_uninterpreted_function(const std::string &name, const std::vector< smt_astt > &args, smt_sortt rangesort) override
Apply an uninterpreted function.
Definition mathsat_conv.cpp:792
expr2tc get_array_elem(smt_astt array, uint64_t index, const type2tc &subtype) override
Extract an element from the model of an array, at an explicit index.
Definition mathsat_conv.cpp:180
smt_astt mk_extract(smt_astt a, unsigned int high, unsigned int low) override
Create an 'extract' func app.
Definition mathsat_conv.cpp:828
smt_astt mk_smt_fpbv_abs(smt_astt op) override
Convert an ieee abs operation.
Definition mathsat_conv.cpp:1478
msat_config cfg
Definition mathsat_conv.h:153
smt_astt mk_smt_fpbv_inf(bool sgn, unsigned ew, unsigned sw) override
Create a (+/-)inf floating point bitvector.
Definition mathsat_conv.cpp:723
smt_astt mk_smt_nearbyint_from_float(smt_astt from, smt_astt rm) override
Calculate the nearby int from a floating point, considering the rounding mode.
Definition mathsat_conv.cpp:1265
smt_astt mk_smt_fpbv_eq(smt_astt lhs, smt_astt rhs) override
Convert an ieee equality.
Definition mathsat_conv.cpp:1352
smt_astt mk_bvsdiv(smt_astt a, smt_astt b) override
Definition mathsat_conv.cpp:315
smt_astt mk_or(smt_astt a, smt_astt b) override
Definition mathsat_conv.cpp:484
smt_astt mk_zero_ext(smt_astt a, unsigned int topwidth) override
Identical to mk_sign_ext, but extends AST with zeros.
Definition mathsat_conv.cpp:854
~mathsat_smt_ast() override=default
void dump() const override
Definition mathsat_conv.cpp:959
mathsat_smt_ast(smt_solver_baset *ctx, msat_term _t, const smt_sort *_s)
Definition mathsat_conv.cpp:948
Definition namespace.h:10
The base SMT-conversion class/interface.
Definition smt_solver.h:170
smt_solver_baset(const namespacet &_ns, const optionst &_options)
Primary constructor.
Definition smt_solver.cpp:78
const optionst & options
Definition smt_solver.h:1130
const namespacet & ns
A namespace containing all the types in the program.
Definition smt_solver.h:1128
solver_smt_ast(smt_solver_baset *ctx, msat_term _a, smt_sortt s)
Definition smt_ast.h:103
pthread_cond_t cond
Definition cuda.h:50
irep_container< type2t > type2tc
Definition irep2.h:430
irep_container< expr2t > expr2tc
Definition irep2.h:431
const smt_ast * smt_astt
Definition smt_ast.h:30
smt_resultt
Result of a call to dec_solve.
Definition smt_result.h:7
const smt_sort * smt_sortt
Definition smt_sort.h:37