ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
z3_conv.h
Go to the documentation of this file.
1#ifndef _ESBMC_SOLVERS_Z3_Z3_CONV_H
2#define _ESBMC_SOLVERS_Z3_Z3_CONV_H
3
5#include <z3++.h>
6#include <fstream>
7
8class z3_smt_ast : public solver_smt_ast<z3::expr>
9{
10public:
11 using solver_smt_ast<z3::expr>::solver_smt_ast;
12 ~z3_smt_ast() override = default;
13
17 unsigned int idx,
18 const expr2tc &idx_expr) const override;
19
20 smt_astt project(smt_solver_baset *ctx, unsigned int elem) const override;
21
22 void dump() const override;
23};
24
25/* Be sure to not make smt_solver_baset a *virtual* base class: our dtor
26 * ~z3_convt() erases all smt_asts early. */
28 public tuple_iface,
29 public array_iface,
30 public fp_convt
31{
32public:
33 z3_convt(const namespacet &ns, const optionst &options);
34 ~z3_convt() override;
35
36public:
37 void push_ctx() override;
38 void pop_ctx() override;
39 smt_resultt dec_solve() override;
40 smt_resultt dec_solve_assuming(const ast_vec &assumptions) override;
41 bool supports_assumptions() const override
42 {
43 return true;
44 }
45
46 tvt get_bool(smt_astt a) override;
47 BigInt get_bv(smt_astt a, bool is_signed) override;
48 ieee_floatt get_fpbv(smt_astt a) override;
49 bool
50 get_rational(smt_astt a, BigInt &numerator, BigInt &denominator) override;
51 expr2tc get_array_elem(smt_astt array, uint64_t index, const type2tc &subtype)
52 override;
53
54 z3::expr
55 mk_tuple_update(const z3::expr &t, unsigned i, const z3::expr &new_val);
56 z3::expr mk_tuple_select(const z3::expr &t, unsigned i);
57
58 // SMT-abstraction migration:
59 smt_astt mk_add(smt_astt a, smt_astt b) override;
60 smt_astt mk_bvadd(smt_astt a, smt_astt b) override;
61 smt_astt mk_sub(smt_astt a, smt_astt b) override;
62 smt_astt mk_bvsub(smt_astt a, smt_astt b) override;
63 smt_astt mk_mul(smt_astt a, smt_astt b) override;
64 smt_astt mk_bvmul(smt_astt a, smt_astt b) override;
65 smt_astt mk_mod(smt_astt a, smt_astt b) override;
66 smt_astt mk_bvsmod(smt_astt a, smt_astt b) override;
67 smt_astt mk_bvumod(smt_astt a, smt_astt b) override;
68 smt_astt mk_div(smt_astt a, smt_astt b) override;
69 smt_astt mk_bvsdiv(smt_astt a, smt_astt b) override;
70 smt_astt mk_bvudiv(smt_astt a, smt_astt b) override;
71 smt_astt mk_shl(smt_astt a, smt_astt b) override;
72 smt_astt mk_bvshl(smt_astt a, smt_astt b) override;
73 smt_astt mk_bvashr(smt_astt a, smt_astt b) override;
74 smt_astt mk_bvlshr(smt_astt a, smt_astt b) override;
75 smt_astt mk_neg(smt_astt a) override;
76 smt_astt mk_bvneg(smt_astt a) override;
77 smt_astt mk_bvnot(smt_astt a) override;
78 smt_astt mk_bvxor(smt_astt a, smt_astt b) override;
79 smt_astt mk_bvor(smt_astt a, smt_astt b) override;
80 smt_astt mk_bvand(smt_astt a, smt_astt b) override;
81 smt_astt mk_implies(smt_astt a, smt_astt b) override;
82 smt_astt mk_xor(smt_astt a, smt_astt b) override;
83 smt_astt mk_or(smt_astt a, smt_astt b) override;
84 smt_astt mk_and(smt_astt a, smt_astt b) override;
85 smt_astt mk_not(smt_astt a) override;
86 smt_astt mk_lt(smt_astt a, smt_astt b) override;
87 smt_astt mk_bvult(smt_astt a, smt_astt b) override;
88 smt_astt mk_bvslt(smt_astt a, smt_astt b) override;
89 smt_astt mk_gt(smt_astt a, smt_astt b) override;
90 smt_astt mk_bvugt(smt_astt a, smt_astt b) override;
91 smt_astt mk_bvsgt(smt_astt a, smt_astt b) override;
92 smt_astt mk_le(smt_astt a, smt_astt b) override;
93 smt_astt mk_bvule(smt_astt a, smt_astt b) override;
94 smt_astt mk_bvsle(smt_astt a, smt_astt b) override;
95 smt_astt mk_ge(smt_astt a, smt_astt b) override;
96 smt_astt mk_bvuge(smt_astt a, smt_astt b) override;
97 smt_astt mk_bvsge(smt_astt a, smt_astt b) override;
98 smt_astt mk_eq(smt_astt a, smt_astt b) override;
99 smt_astt mk_neq(smt_astt a, smt_astt b) override;
100 smt_astt mk_store(smt_astt a, smt_astt b, smt_astt c) override;
101 smt_astt mk_select(smt_astt a, smt_astt b) override;
102 smt_astt mk_real2int(smt_astt a) override;
103 smt_astt mk_int2real(smt_astt a) override;
104 smt_astt mk_isint(smt_astt a) override;
105 smt_astt overflow_arith(const expr2tc &expr) override;
106
107 smt_sortt mk_bool_sort() override;
108 smt_sortt mk_real_sort() override;
109 smt_sortt mk_int_sort() override;
110 smt_sortt mk_bv_sort(std::size_t width) override;
112 smt_sortt mk_fbv_sort(std::size_t width) override;
113 smt_sortt mk_bvfp_sort(std::size_t ew, std::size_t sw) override;
114 smt_sortt mk_bvfp_rm_sort() override;
115 smt_sortt mk_fpbv_sort(const unsigned ew, const unsigned sw) override;
116 smt_sortt mk_fpbv_rm_sort() override;
117
118 smt_astt mk_smt_int(const BigInt &theint) override;
119 smt_astt mk_smt_real(const std::string &str) override;
120 smt_astt mk_smt_bv(const BigInt &theint, smt_sortt s) override;
121 smt_astt mk_smt_fpbv(const ieee_floatt &thereal) override;
122 smt_astt mk_smt_fpbv_nan(bool sgn, unsigned ew, unsigned sw) override;
123 smt_astt mk_smt_fpbv_inf(bool sgn, unsigned ew, unsigned sw) override;
125
127 mk_smt_fpbv_fma(smt_astt v1, smt_astt v2, smt_astt v3, smt_astt rm) override;
129 mk_smt_typecast_from_fpbv_to_ubv(smt_astt from, std::size_t width) override;
131 mk_smt_typecast_from_fpbv_to_sbv(smt_astt from, std::size_t width) override;
133 smt_astt from,
134 smt_sortt to,
135 smt_astt rm) override;
137 override;
139 override;
140 smt_astt mk_smt_fpbv_add(smt_astt lhs, smt_astt rhs, smt_astt rm) override;
141 smt_astt mk_smt_fpbv_sub(smt_astt lhs, smt_astt rhs, smt_astt rm) override;
142 smt_astt mk_smt_fpbv_mul(smt_astt lhs, smt_astt rhs, smt_astt rm) override;
143 smt_astt mk_smt_fpbv_div(smt_astt lhs, smt_astt rhs, smt_astt rm) override;
144 smt_astt mk_smt_fpbv_rem(smt_astt lhs, smt_astt rhs) override;
147
148 smt_astt mk_smt_fpbv_eq(smt_astt lhs, smt_astt rhs) override;
149 smt_astt mk_smt_fpbv_gt(smt_astt lhs, smt_astt rhs) override;
150 smt_astt mk_smt_fpbv_lt(smt_astt lhs, smt_astt rhs) override;
151 smt_astt mk_smt_fpbv_gte(smt_astt lhs, smt_astt rhs) override;
152 smt_astt mk_smt_fpbv_lte(smt_astt lhs, smt_astt rhs) override;
159 smt_astt mk_smt_fpbv_abs(smt_astt op) override;
160 smt_astt mk_smt_fpbv_neg(smt_astt op) override;
163
164 smt_astt mk_smt_bool(bool val) override;
166 const std::string &name,
167 const smt_sort *s,
168 smt_sortt array_subtype) override;
169 smt_astt mk_smt_symbol(const std::string &name, const smt_sort *s) override;
171 const std::string &name,
172 const std::vector<smt_astt> &args,
173 smt_sortt rangesort) override;
174 smt_sortt mk_struct_sort(const type2tc &type) override;
175 smt_astt mk_extract(smt_astt a, unsigned int high, unsigned int low) override;
176 smt_astt mk_sign_ext(smt_astt a, unsigned int topwidth) override;
177 smt_astt mk_zero_ext(smt_astt a, unsigned int topwidth) override;
178 smt_astt mk_concat(smt_astt a, smt_astt b) override;
180
181 smt_astt tuple_create(const expr2tc &structdef) override;
182 smt_astt tuple_fresh(const smt_sort *s, std::string name = "") override;
183 expr2tc tuple_get(const expr2tc &expr) override;
184 expr2tc tuple_get(const type2tc &type, smt_astt sym) override;
185
188 uint64_t index,
189 const type2tc &subtype) override;
190
192 const type2tc &array_type,
193 smt_astt *input_args,
194 bool const_array,
195 const smt_sort *domain) override;
196
197 smt_astt mk_tuple_symbol(const std::string &name, smt_sortt s) override;
198 smt_astt mk_tuple_array_symbol(const expr2tc &expr) override;
200 tuple_array_of(const expr2tc &init, unsigned long domain_width) override;
201
203 convert_array_of(smt_astt init_val, unsigned long domain_width) override;
204
205 void assert_ast(smt_astt a) override;
206
207 const std::string solver_text() override
208 {
209 unsigned int major, minor, build, revision;
210 Z3_get_version(&major, &minor, &build, &revision);
211 std::stringstream ss;
212 ss << "Z3 v" << major << "." << minor << "." << build;
213 return ss.str();
214 }
215
216 std::string dump_smt() override;
217 void print_model() override;
219 bool is_forall,
220 std::vector<smt_astt> lhs,
221 smt_astt rhs) override;
222
223private:
224 void print_smt_formulae(std::ostream &dest);
225 bool
226 parse_rational_bigint(Z3_string str, BigInt &numerator, BigInt &denominator);
227
228public:
229 virtual void output_smt();
230 // Must be first member; that way it's the last to be destroyed.
231 z3::context z3_ctx;
232 z3::solver solver;
233};
234
235#endif /* _ESBMC_SOLVERS_Z3_Z3_CONV_H_ */
Definition bigint.hh:58
array_iface(bool _b, bool inf)
Definition smt_array.h:14
Definition toml.hpp:6607
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
Definition options.h:11
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
std::vector< smt_astt > ast_vec
Shorthand for a vector of smt_ast's.
Definition smt_solver.h:173
Definition smt_sort.h:40
solver_smt_ast(smt_solver_baset *ctx, z3::expr _a, smt_sortt s)
Definition smt_ast.h:103
Definition smt_tuple.h:27
Definition threeval.h:10
Definition toml.hpp:1531
smt_astt mk_smt_fpbv_eq(smt_astt lhs, smt_astt rhs) override
Convert an ieee equality.
Definition z3_conv.cpp:1836
~z3_convt() override
Definition z3_conv.cpp:76
z3::expr mk_tuple_update(const z3::expr &t, unsigned i, const z3::expr &new_val)
Definition z3_conv.cpp:133
smt_astt mk_bvashr(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:392
smt_sortt mk_int_sort() override
Create a int sort.
Definition z3_conv.cpp:1640
smt_astt mk_shl(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:366
smt_astt tuple_array_create(const type2tc &array_type, smt_astt *input_args, bool const_array, const smt_sort *domain) override
Definition z3_conv.cpp:1173
smt_astt mk_bvugt(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:653
smt_astt mk_bvsgt(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:668
z3_convt(const namespacet &ns, const optionst &options)
Definition z3_conv.cpp:48
smt_astt mk_bvsdiv(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:336
smt_sortt mk_array_sort(smt_sortt domain, smt_sortt range) override
Create an array sort.
Definition z3_conv.cpp:1657
smt_astt mk_smt_symbol(const std::string &name, const smt_sort *s) override
Definition z3_conv.cpp:1026
smt_astt mk_smt_fpbv_gte(smt_astt lhs, smt_astt rhs) override
Convert an ieee greater than or equal.
Definition z3_conv.cpp:1569
const std::string solver_text() override
Solver name fetcher.
Definition z3_conv.h:207
smt_astt mk_store(smt_astt a, smt_astt b, smt_astt c) override
Definition z3_conv.cpp:790
smt_astt mk_bvor(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:487
void pop_ctx() override
Pop one context on the SMT assertion stack.
Definition z3_conv.cpp:88
smt_astt mk_smt_fpbv_sqrt(smt_astt rd, smt_astt rm) override
Convert the ieee arithmetic square-root (sqrt).
Definition z3_conv.cpp:1768
smt_astt mk_bvsmod(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:291
z3::context z3_ctx
Definition z3_conv.h:231
smt_astt mk_bvumod(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:306
smt_sortt mk_bvfp_rm_sort() override
Create a floating-point rounding mode sort, using bitvectors.
Definition z3_conv.cpp:1625
BigInt get_bv(smt_astt a, bool is_signed) override
Extract the assignment to a bitvector from the SMT solver's model.
Definition z3_conv.cpp:1342
smt_astt mk_smt_int(const BigInt &theint) override
Create an integer smt_ast.
Definition z3_conv.cpp:900
smt_astt mk_div(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:321
smt_astt mk_bvadd(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:201
std::string dump_smt() override
Method to dump the SMT formula.
Definition z3_conv.cpp:1513
smt_astt mk_int2real(smt_astt a) override
Definition z3_conv.cpp:823
smt_astt mk_bvnot(smt_astt a) override
Definition z3_conv.cpp:434
smt_astt mk_smt_typecast_sbv_to_fpbv(smt_astt from, smt_sortt to, smt_astt rm) override
Typecast to a floating point.
Definition z3_conv.cpp:1747
smt_astt mk_smt_fpbv(const ieee_floatt &thereal) override
Create a floating point bitvector.
Definition z3_conv.cpp:940
expr2tc tuple_get(const expr2tc &expr) override
Extract the assignment to a tuple-typed symbol from the SMT solvers model.
Definition z3_conv.cpp:1277
smt_astt mk_or(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:569
smt_astt mk_array_symbol(const std::string &name, const smt_sort *s, smt_sortt array_subtype) override
Definition z3_conv.cpp:1018
smt_astt mk_bvmul(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:241
smt_sortt mk_fpbv_rm_sort() override
Create a sort representing a floating-point rounding mode.
Definition z3_conv.cpp:1611
expr2tc tuple_get_array_elem(smt_astt array, uint64_t index, const type2tc &subtype) override
Definition z3_conv.cpp:1478
z3::solver solver
Definition z3_conv.h:232
smt_astt convert_array_of(smt_astt init_val, unsigned long domain_width) override
Create an array with a single initializer.
Definition z3_conv.cpp:1161
smt_astt mk_tuple_array_symbol(const expr2tc &expr) override
Like mk_tuple_symbol, but for arrays.
Definition z3_conv.cpp:1224
smt_astt mk_smt_fpbv_is_positive(smt_astt op) override
Convert an ieee is_pos operation.
Definition z3_conv.cpp:1891
smt_astt mk_mod(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:276
smt_astt mk_smt_fpbv_nan(bool sgn, unsigned ew, unsigned sw) override
Create a NaN floating point bitvector.
Definition z3_conv.cpp:965
smt_astt mk_bvsge(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:758
ieee_floatt get_fpbv(smt_astt a) override
Extract the assignment to a floating-point from the SMT solvers model.
Definition z3_conv.cpp:1425
smt_astt mk_smt_fpbv_gt(smt_astt lhs, smt_astt rhs) override
Convert an ieee greater than.
Definition z3_conv.cpp:1545
smt_astt mk_ite(smt_astt cond, smt_astt t, smt_astt f) override
Create an ite operation.
Definition z3_conv.cpp:887
smt_astt mk_bvshl(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:377
smt_astt mk_bvsle(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:713
smt_sortt mk_bvfp_sort(std::size_t ew, std::size_t sw) override
Create a floating-point sort, using bitvectors.
Definition z3_conv.cpp:1619
smt_astt mk_bvlshr(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:407
smt_astt mk_mul(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:231
smt_astt mk_real2int(smt_astt a) override
Definition z3_conv.cpp:814
smt_astt mk_xor(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:556
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 z3_conv.cpp:855
smt_sortt mk_bool_sort() override
Create a bool sort.
Definition z3_conv.cpp:1630
smt_astt mk_bvule(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:698
smt_astt mk_concat(smt_astt a, smt_astt b) override
Concatenate two smt expressions.
Definition z3_conv.cpp:872
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 z3_conv.cpp:1759
smt_astt mk_neq(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:781
smt_astt mk_bvsub(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:221
smt_astt mk_smt_fpbv_inf(bool sgn, unsigned ew, unsigned sw) override
Create a (+/-)inf floating point bitvector.
Definition z3_conv.cpp:979
void print_model() override
Method to print the SMT model.
Definition z3_conv.cpp:1598
smt_astt mk_and(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:578
smt_resultt dec_solve_assuming(const ast_vec &assumptions) override
Solve with each boolean ast in assumptions held true for this query only.
Definition z3_conv.cpp:110
smt_sortt mk_real_sort() override
Create a real sort.
Definition z3_conv.cpp:1635
smt_astt mk_extract(smt_astt a, unsigned int high, unsigned int low) override
Create an 'extract' func app.
Definition z3_conv.cpp:841
smt_astt mk_smt_fpbv_lt(smt_astt lhs, smt_astt rhs) override
Convert an ieee less than.
Definition z3_conv.cpp:1557
void push_ctx() override
Push one context on the SMT assertion stack.
Definition z3_conv.cpp:82
smt_astt mk_lt(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:593
smt_astt mk_select(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:804
smt_astt mk_smt_typecast_from_fpbv_to_sbv(smt_astt from, std::size_t width) override
Typecast from a floating point.
Definition z3_conv.cpp:1705
smt_astt mk_smt_fpbv_is_normal(smt_astt op) override
Convert an ieee is_normal operation.
Definition z3_conv.cpp:1865
smt_astt mk_neg(smt_astt a) override
Definition z3_conv.cpp:422
smt_astt mk_isint(smt_astt a) override
Definition z3_conv.cpp:832
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 z3_conv.cpp:1718
smt_astt mk_bvslt(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:623
smt_astt mk_smt_fpbv_is_nan(smt_astt op) override
Convert an ieee is_nan operation.
Definition z3_conv.cpp:1848
smt_astt mk_bvudiv(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:351
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 z3_conv.cpp:1777
smt_sortt mk_struct_sort(const type2tc &type) override
Create a sort representing a struct.
Definition z3_conv.cpp:1054
smt_astt tuple_create(const expr2tc &structdef) override
Create a new tuple from a struct definition.
Definition z3_conv.cpp:1129
smt_astt mk_smt_fpbv_is_inf(smt_astt op) override
Convert an ieee is_inf operation.
Definition z3_conv.cpp:1856
smt_astt mk_bvneg(smt_astt a) override
Definition z3_conv.cpp:428
smt_resultt dec_solve() override
Solve the formula given to the solver.
Definition z3_conv.cpp:94
smt_astt mk_quantifier(bool is_forall, std::vector< smt_astt > lhs, smt_astt rhs) override
Definition z3_conv.cpp:1909
smt_astt mk_bvult(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:608
smt_astt mk_bvand(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:517
smt_astt mk_smt_fpbv_abs(smt_astt op) override
Convert an ieee abs operation.
Definition z3_conv.cpp:1900
z3::expr mk_tuple_select(const z3::expr &t, unsigned i)
Definition z3_conv.cpp:169
smt_astt mk_add(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:191
smt_astt mk_bvuge(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:743
smt_astt mk_from_fp_to_bv(smt_astt op) override
Convert FP to BV.
Definition z3_conv.cpp:1679
tvt get_bool(smt_astt a) override
Extract the assignment to a boolean variable from the SMT solver's model.
Definition z3_conv.cpp:1320
smt_astt mk_zero_ext(smt_astt a, unsigned int topwidth) override
Identical to mk_sign_ext, but extends AST with zeros.
Definition z3_conv.cpp:865
smt_astt mk_smt_fpbv_add(smt_astt lhs, smt_astt rhs, smt_astt rm) override
Convert a ieee addition.
Definition z3_conv.cpp:1788
smt_astt mk_smt_fpbv_sub(smt_astt lhs, smt_astt rhs, smt_astt rm) override
Convert a ieee subtraction.
Definition z3_conv.cpp:1798
smt_astt mk_smt_fpbv_mul(smt_astt lhs, smt_astt rhs, smt_astt rm) override
Convert a ieee multiplication.
Definition z3_conv.cpp:1808
smt_astt mk_implies(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:547
smt_astt mk_bvxor(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:457
smt_astt mk_smt_fpbv_is_negative(smt_astt op) override
Convert an ieee is_neg operation.
Definition z3_conv.cpp:1882
smt_astt mk_smt_fpbv_lte(smt_astt lhs, smt_astt rhs) override
Convert an ieee less than or equal.
Definition z3_conv.cpp:1581
smt_astt mk_not(smt_astt a) override
Definition z3_conv.cpp:587
bool supports_assumptions() const override
Definition z3_conv.h:41
smt_astt mk_smt_bv(const BigInt &theint, smt_sortt s) override
Create a bitvector.
Definition z3_conv.cpp:922
smt_astt mk_ge(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:728
smt_astt mk_smt_fpbv_neg(smt_astt op) override
Convert an ieee negation operation.
Definition z3_conv.cpp:1593
smt_astt mk_gt(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:638
smt_sortt mk_bv_sort(std::size_t width) override
Create a bv sort.
Definition z3_conv.cpp:1645
smt_astt mk_smt_fpbv_is_zero(smt_astt op) override
Convert an ieee is_zero operation.
Definition z3_conv.cpp:1874
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 z3_conv.cpp:1032
smt_astt mk_eq(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:773
smt_astt tuple_array_of(const expr2tc &init, unsigned long domain_width) override
Create a potentially /large/ array of tuples.
Definition z3_conv.cpp:1231
smt_sortt mk_fbv_sort(std::size_t width) override
Create a fixed-point sort.
Definition z3_conv.cpp:1651
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 z3_conv.cpp:1828
smt_astt mk_from_bv_to_fp(smt_astt op, smt_sortt to) override
Convert BV to FP.
Definition z3_conv.cpp:1667
smt_astt mk_le(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:683
smt_astt overflow_arith(const expr2tc &expr) override
Detect integer arithmetic overflows.
Definition z3_conv.cpp:251
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 z3_conv.cpp:988
bool get_rational(smt_astt a, BigInt &numerator, BigInt &denominator) override
Extract the assignment to a rational/real value from the SMT solvers model.
Definition z3_conv.cpp:1361
smt_astt mk_smt_typecast_ubv_to_fpbv(smt_astt from, smt_sortt to, smt_astt rm) override
Typecast to a floating point.
Definition z3_conv.cpp:1734
smt_astt mk_smt_typecast_from_fpbv_to_ubv(smt_astt from, std::size_t width) override
Typecast from a floating point.
Definition z3_conv.cpp:1691
smt_sortt mk_fpbv_sort(const unsigned ew, const unsigned sw) override
Create a sort representing a floating-point number.
Definition z3_conv.cpp:1603
virtual void output_smt()
Definition z3_conv.cpp:1493
smt_astt mk_smt_bool(bool val) override
Create a boolean.
Definition z3_conv.cpp:1013
smt_astt tuple_fresh(const smt_sort *s, std::string name="") override
Definition z3_conv.cpp:1154
smt_astt mk_sub(smt_astt a, smt_astt b) override
Definition z3_conv.cpp:211
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 z3_conv.cpp:1463
smt_astt mk_smt_fpbv_div(smt_astt lhs, smt_astt rhs, smt_astt rm) override
Convert the ieee division.
Definition z3_conv.cpp:1818
smt_astt mk_tuple_symbol(const std::string &name, smt_sortt s) override
Convert a symbol to a tuple_smt_ast.
Definition z3_conv.cpp:1219
smt_astt mk_smt_real(const std::string &str) override
Create a real in a smt_ast.
Definition z3_conv.cpp:916
void assert_ast(smt_astt a) override
Assert the truth of an ast.
Definition z3_conv.cpp:126
Definition z3_conv.h:9
~z3_smt_ast() override=default
smt_astt update(smt_solver_baset *ctx, smt_astt value, unsigned int idx, const expr2tc &idx_expr) const override
Abstractly produce an "update", i.e., an array 'with' or tuple 'with'.
Definition z3_conv.cpp:1097
void dump() const override
Definition z3_conv.cpp:1486
smt_astt project(smt_solver_baset *ctx, unsigned int elem) const override
Project a member from a structure, or an field-array from a struct array.
Definition z3_conv.cpp:1114
pthread_cond_t cond
Definition cuda.h:50
irep_container< type2t > type2tc
Definition irep2.h:430
irep_container< expr2t > expr2tc
Definition irep2.h:431
Definition range.py:1
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