1#ifndef _ESBMC_SOLVERS_CVC_CVC5_CONV_H_
2#define _ESBMC_SOLVERS_CVC_CVC5_CONV_H_
12 void dump()
const override;
18 unsigned quantifier_counter = 0;
147 const std::string &name,
152 const std::string &name,
153 const std::vector<smt_astt> &args,
170 std::vector<smt_astt> lhs,
181 std::unordered_map<std::string, cvc5::Term>
uf_decls;
array_iface(bool _b, bool inf)
Definition smt_array.h:14
smt_astt mk_isint(smt_astt a) override
Definition cvc5_conv.cpp:286
smt_astt mk_bvadd(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:627
smt_astt mk_smt_fpbv_gte(smt_astt lhs, smt_astt rhs) override
Convert an ieee greater than or equal.
Definition cvc5_conv.cpp:531
smt_astt mk_smt_fpbv_mul(smt_astt lhs, smt_astt rhs, smt_astt rm) override
Convert a ieee multiplication.
Definition cvc5_conv.cpp:449
smt_sortt mk_bool_sort() override
Create a bool sort.
Definition cvc5_conv.cpp:1264
smt_sortt mk_bv_sort(std::size_t width) override
Create a bv sort.
Definition cvc5_conv.cpp:1280
smt_astt mk_smt_fpbv_add(smt_astt lhs, smt_astt rhs, smt_astt rm) override
Convert a ieee addition.
Definition cvc5_conv.cpp:427
std::string dump_smt() override
Method to dump the SMT formula.
Definition cvc5_conv.cpp:1342
cvc5::Solver slv
Definition cvc5_conv.h:175
smt_astt mk_shl(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:201
BigInt get_bv(smt_astt a, bool is_signed) override
Extract the assignment to a bitvector from the SMT solver's model.
Definition cvc5_conv.cpp:102
smt_astt mk_sub(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:146
smt_astt mk_bvor(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:788
~cvc5_convt() override=default
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 cvc5_conv.cpp:481
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 cvc5_conv.cpp:1076
smt_astt mk_quantifier(bool is_forall, std::vector< smt_astt > lhs, smt_astt rhs) override
Definition cvc5_conv.cpp:1357
smt_astt mk_bvslt(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:879
smt_sortt mk_int_sort() override
Create a int sort.
Definition cvc5_conv.cpp:1275
smt_sortt mk_fpbv_rm_sort() override
Create a sort representing a floating-point rounding mode.
Definition cvc5_conv.cpp:1320
smt_astt mk_bvashr(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:731
smt_astt mk_smt_fpbv_neg(smt_astt op) override
Convert an ieee negation operation.
Definition cvc5_conv.cpp:613
smt_astt mk_store(smt_astt a, smt_astt b, smt_astt c) override
Definition cvc5_conv.cpp:992
smt_astt mk_implies(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:814
smt_astt mk_neg(smt_astt a) override
Definition cvc5_conv.cpp:214
smt_astt mk_smt_bv(const BigInt &theint, smt_sortt s) override
Create a bitvector.
Definition cvc5_conv.cpp:1101
smt_astt mk_smt_bool(bool val) override
Create a boolean.
Definition cvc5_conv.cpp:1114
smt_astt mk_smt_fpbv_is_normal(smt_astt op) override
Convert an ieee is_normal operation.
Definition cvc5_conv.cpp:569
smt_astt mk_lt(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:222
smt_sortt mk_bvfp_sort(std::size_t ew, std::size_t sw) override
Create a floating-point sort, using bitvectors.
Definition cvc5_conv.cpp:1302
unsigned int to_bv_counter
Definition cvc5_conv.h:173
smt_astt convert_array_of(smt_astt init_val, unsigned long domain_width) override
Create an array with a single initializer.
Definition cvc5_conv.cpp:1252
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 cvc5_conv.cpp:295
smt_astt mk_smt_fpbv_abs(smt_astt op) override
Convert an ieee abs operation.
Definition cvc5_conv.cpp:605
smt_astt mk_bvsdiv(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:692
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 cvc5_conv.cpp:1148
smt_astt mk_bvsge(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:957
const std::string solver_text() override
Solver name fetcher.
Definition cvc5_conv.cpp:126
smt_astt mk_gt(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:234
smt_astt mk_bvsgt(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:905
smt_astt mk_smt_fpbv_nan(bool sgn, unsigned ew, unsigned sw) override
Create a NaN floating point bitvector.
Definition cvc5_conv.cpp:1053
void push_ctx() override
Push one context on the SMT assertion stack.
Definition cvc5_conv.cpp:1327
smt_astt mk_bvshl(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:718
smt_sortt mk_array_sort(smt_sortt domain, smt_sortt range) override
Create an array sort.
Definition cvc5_conv.cpp:1292
smt_astt mk_not(smt_astt a) override
Definition cvc5_conv.cpp:858
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 cvc5_conv.cpp:110
smt_astt mk_and(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:847
smt_astt mk_smt_int(const BigInt &theint) override
Create an integer smt_ast.
Definition cvc5_conv.cpp:1019
smt_astt mk_smt_fpbv_is_nan(smt_astt op) override
Convert an ieee is_nan operation.
Definition cvc5_conv.cpp:551
smt_astt mk_extract(smt_astt a, unsigned int high, unsigned int low) override
Create an 'extract' func app.
Definition cvc5_conv.cpp:1187
bool supports_assumptions() const override
Definition cvc5_conv.h:26
smt_sortt mk_bvfp_rm_sort() override
Create a floating-point rounding mode sort, using bitvectors.
Definition cvc5_conv.cpp:1308
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 cvc5_conv.cpp:471
smt_astt mk_smt_typecast_ubv_to_fpbv(smt_astt from, smt_sortt to, smt_astt rm) override
Typecast to a floating point.
Definition cvc5_conv.cpp:360
smt_astt mk_bvlshr(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:744
smt_astt mk_bvnot(smt_astt a) override
Definition cvc5_conv.cpp:766
smt_astt mk_smt_fpbv_lt(smt_astt lhs, smt_astt rhs) override
Convert an ieee less than.
Definition cvc5_conv.cpp:521
smt_astt mk_smt_fpbv_sub(smt_astt lhs, smt_astt rhs, smt_astt rm) override
Convert a ieee subtraction.
Definition cvc5_conv.cpp:438
smt_astt mk_le(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:246
smt_astt mk_bvuge(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:944
smt_astt mk_smt_fpbv_sqrt(smt_astt rd, smt_astt rm) override
Convert the ieee arithmetic square-root (sqrt).
Definition cvc5_conv.cpp:491
smt_astt mk_zero_ext(smt_astt a, unsigned int topwidth) override
Identical to mk_sign_ext, but extends AST with zeros.
Definition cvc5_conv.cpp:1213
smt_astt mk_bvudiv(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:705
cvc5_convt(const namespacet &ns, const optionst &options)
Definition cvc5_conv.cpp:21
smt_astt mk_real2int(smt_astt a) override
Definition cvc5_conv.cpp:270
smt_astt mk_bvugt(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:892
smt_sortt mk_fbv_sort(std::size_t width) override
Create a fixed-point sort.
Definition cvc5_conv.cpp:1286
smt_astt mk_bvsub(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:640
smt_astt mk_bvxor(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:775
smt_astt mk_from_bv_to_fp(smt_astt op, smt_sortt to) override
Convert BV to FP.
Definition cvc5_conv.cpp:396
smt_astt mk_from_fp_to_bv(smt_astt op) override
Convert FP to BV.
Definition cvc5_conv.cpp:406
smt_astt mk_xor(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:825
smt_astt mk_bvsmod(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:666
smt_astt mk_bvneg(smt_astt a) override
Definition cvc5_conv.cpp:757
smt_astt mk_bvand(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:801
tvt get_bool(smt_astt a) override
Extract the assignment to a boolean variable from the SMT solver's model.
Definition cvc5_conv.cpp:65
smt_astt mk_bvule(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:918
smt_astt mk_smt_fpbv_lte(smt_astt lhs, smt_astt rhs) override
Convert an ieee less than or equal.
Definition cvc5_conv.cpp:541
smt_astt mk_smt_fpbv_eq(smt_astt lhs, smt_astt rhs) override
Convert an ieee equality.
Definition cvc5_conv.cpp:501
smt_astt mk_smt_fpbv_div(smt_astt lhs, smt_astt rhs, smt_astt rm) override
Convert the ieee division.
Definition cvc5_conv.cpp:460
symtabt symtable
Definition cvc5_conv.h:177
smt_astt mk_ge(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:258
void assert_ast(smt_astt a) override
Assert the truth of an ast.
Definition cvc5_conv.cpp:621
smt_astt mk_smt_fpbv_is_negative(smt_astt op) override
Convert an ieee is_neg operation.
Definition cvc5_conv.cpp:587
smt_astt mk_smt_fpbv_is_inf(smt_astt op) override
Convert an ieee is_inf operation.
Definition cvc5_conv.cpp:560
std::unordered_map< std::string, cvc5::Term > uf_decls
Uninterpreted-function constants, keyed by name, so every application shares one declaration and the ...
Definition cvc5_conv.h:181
smt_astt mk_smt_fpbv_gt(smt_astt lhs, smt_astt rhs) override
Convert an ieee greater than.
Definition cvc5_conv.cpp:511
ieee_floatt get_fpbv(smt_astt a) override
Extract the assignment to a floating-point from the SMT solvers model.
Definition cvc5_conv.cpp:72
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 cvc5_conv.cpp:1202
smt_resultt dec_solve_assuming(const ast_vec &assumptions) override
Solve with each boolean ast in assumptions held true for this query only.
Definition cvc5_conv.cpp:49
smt_sortt mk_fpbv_sort(const unsigned ew, const unsigned sw) override
Create a sort representing a floating-point number.
Definition cvc5_conv.cpp:1314
smt_astt mk_smt_typecast_sbv_to_fpbv(smt_astt from, smt_sortt to, smt_astt rm) override
Typecast to a floating point.
Definition cvc5_conv.cpp:378
smt_astt mk_smt_typecast_from_fpbv_to_sbv(smt_astt from, std::size_t width) override
Typecast from a floating point.
Definition cvc5_conv.cpp:325
smt_astt mk_smt_fpbv_is_positive(smt_astt op) override
Convert an ieee is_pos operation.
Definition cvc5_conv.cpp:596
smt_astt mk_bvmul(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:653
smt_astt mk_ite(smt_astt cond, smt_astt t, smt_astt f) override
Create an ite operation.
Definition cvc5_conv.cpp:1237
smt_astt mk_neq(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:981
smt_astt mk_smt_fpbv_is_zero(smt_astt op) override
Convert an ieee is_zero operation.
Definition cvc5_conv.cpp:578
smt_astt mk_or(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:836
smt_resultt dec_solve() override
Solve the formula given to the solver.
Definition cvc5_conv.cpp:35
smt_astt mk_smt_fpbv(const ieee_floatt &thereal) override
Create a floating point bitvector.
Definition cvc5_conv.cpp:1035
smt_astt mk_bvsle(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:931
smt_astt mk_bvult(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:866
smt_astt mk_array_symbol(const std::string &name, const smt_sort *s, smt_sortt array_subtype) override
Definition cvc5_conv.cpp:1121
smt_sortt mk_real_sort() override
Create a real sort.
Definition cvc5_conv.cpp:1270
smt_astt mk_select(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:1007
smt_astt mk_smt_symbol(const std::string &name, const smt_sort *s) override
Definition cvc5_conv.cpp:1129
void pop_ctx() override
Pop one context on the SMT assertion stack.
Definition cvc5_conv.cpp:1333
smt_astt mk_smt_typecast_from_fpbv_to_ubv(smt_astt from, std::size_t width) override
Typecast from a floating point.
Definition cvc5_conv.cpp:308
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 cvc5_conv.cpp:341
smt_astt mk_div(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:185
smt_astt mk_smt_fpbv_inf(bool sgn, unsigned ew, unsigned sw) override
Create a (+/-)inf floating point bitvector.
Definition cvc5_conv.cpp:1066
smt_astt mk_bvumod(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:679
smt_astt mk_smt_real(const std::string &str) override
Create a real in a smt_ast.
Definition cvc5_conv.cpp:1029
smt_astt mk_mod(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:172
smt_astt mk_add(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:133
smt_astt mk_eq(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:970
smt_astt mk_int2real(smt_astt a) override
Definition cvc5_conv.cpp:278
smt_astt mk_concat(smt_astt a, smt_astt b) override
Concatenate two smt expressions.
Definition cvc5_conv.cpp:1224
smt_astt mk_mul(smt_astt a, smt_astt b) override
Definition cvc5_conv.cpp:159
void dump() const override
Definition cvc5_conv.cpp:1351
~cvc5_smt_ast() override=default
fp_convt(smt_solver_baset *_ctx)
Definition fp_conv.cpp:26
Definition ieee_float.h:75
rounding_modet
Definition ieee_float.h:78
Definition namespace.h:10
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
std::vector< smt_astt > ast_vec
Shorthand for a vector of smt_ast's.
Definition smt_solver.h:173
solver_smt_ast(smt_solver_baset *ctx, cvc5::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
boost::multi_index_container< symtab_entryt, boost::multi_index::indexed_by< boost::multi_index::hashed_unique< BOOST_MULTI_INDEX_MEMBER(symtab_entryt, std::string, val)>, boost::multi_index::ordered_non_unique< BOOST_MULTI_INDEX_MEMBER(symtab_entryt, unsigned int, level), std::greater< unsigned int > > > > symtabt
Definition smt_solver.h:1299
const smt_sort * smt_sortt
Definition smt_sort.h:37