8 #define SORT_ID(the_id) \
9 const irep_idt ID_smt_##the_id##_sort{"smt_" #the_id "_sort"};
10 #include "smt_sorts.def"
14 #define SORT_ID(the_id) \
16 const smt_##the_id##_sortt *smt_sortt::cast<smt_##the_id##_sortt>() const & \
18 return id() == ID_smt_##the_id##_sort \
19 ? static_cast<const smt_##the_id##_sortt *>(this) \
22 #include "smt_sorts.def"
25 #define SORT_ID(the_id) \
27 std::optional<smt_##the_id##_sortt> smt_sortt::cast<smt_##the_id##_sortt>() \
30 if(id() == ID_smt_##the_id##_sort) \
31 return {std::move(*static_cast<const smt_##the_id##_sortt *>(this))}; \
35 #include "smt_sorts.def"
45 return !(*
this == other);
57 "The definition of SMT2 bit vector theory requires the number of "
58 "bits to be greater than 0.");
86 template <
typename visitort>
89 #define SORT_ID(the_id) \
90 if(id == ID_smt_##the_id##_sort) \
91 return visitor.visit(static_cast<const smt_##the_id##_sortt &>(sort));
92 #include "smt_sorts.def"
104 ::accept(*
this,
id(), std::move(visitor));
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
bool operator==(const irept &other) const
std::size_t get_size_t(const irep_idt &name) const
const irept & find(const irep_idt &name) const
void set_size_t(const irep_idt &name, const std::size_t value)
irept & add(const irep_idt &name)
const smt_sortt & element_sort() const
const smt_sortt & index_sort() const
smt_array_sortt(const smt_sortt &index_sort, const smt_sortt &element_sort)
std::size_t bit_width() const
smt_bit_vector_sortt(std::size_t bit_width)
bool operator==(const smt_sortt &) const
bool operator!=(const smt_sortt &) const
void accept(smt_sort_const_downcast_visitort &) const
void accept(const smt_sortt &sort, const irep_idt &id, visitort &&visitor)
Data structure for smt sorts.
#define UNREACHABLE
This should be used to mark dead code.