File tree 4 files changed +13
-9
lines changed
src/solvers/smt2_incremental 4 files changed +13
-9
lines changed Original file line number Diff line number Diff line change 3
3
#include < solvers/smt2_incremental/smt_logics.h>
4
4
5
5
// Define the irep_idts for logics.
6
- #define LOGIC_ID (the_id ) \
6
+ #define LOGIC_ID (the_id, the_name ) \
7
7
const irep_idt ID_smt_logic_##the_id{" smt_logic_" #the_id};
8
8
#include < solvers/smt2_incremental/smt_logics.def>
9
9
#undef LOGIC_ID
@@ -21,7 +21,7 @@ bool smt_logict::operator!=(const smt_logict &other) const
21
21
template <typename visitort>
22
22
void accept (const smt_logict &logic, const irep_idt &id, visitort &&visitor)
23
23
{
24
- #define LOGIC_ID (the_id ) \
24
+ #define LOGIC_ID (the_id, the_name ) \
25
25
if (id == ID_smt_logic_##the_id) \
26
26
return visitor.visit (static_cast <const smt_logic_##the_id##t &>(logic));
27
27
// The include below is marked as nolint because including the same file
@@ -41,7 +41,7 @@ void smt_logict::accept(smt_logic_const_downcast_visitort &&visitor) const
41
41
::accept (*this , id(), std::move(visitor));
42
42
}
43
43
44
- #define LOGIC_ID (the_id ) \
44
+ #define LOGIC_ID (the_id, the_name ) \
45
45
smt_logic_##the_id##t::smt_logic_##the_id##t() \
46
46
: smt_logict{ID_smt_logic_##the_id} \
47
47
{ \
Original file line number Diff line number Diff line change 6
6
/// * The constant `irep_idt`s used to identify each of the logic classes.
7
7
/// * The member functions of the `smt_logic_const_downcast_visitort` class.
8
8
/// * The type of option checks required to implement `smt_logict::accept`.
9
- LOGIC_ID(quantifier_free_bit_vectors)
9
+ LOGIC_ID(quantifier_free_bit_vectors, QF_BV )
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ const smt_logict &smt_logict::storert<derivedt>::downcast(const irept &irep)
61
61
return static_cast <const smt_logict &>(irep);
62
62
}
63
63
64
- #define LOGIC_ID (the_id ) \
64
+ #define LOGIC_ID (the_id, the_name ) \
65
65
/* NOLINTNEXTLINE(readability/identifiers) cpplint does not match the ## */ \
66
66
class smt_logic_ ##the_id##t : public smt_logict \
67
67
{ \
@@ -74,7 +74,8 @@ const smt_logict &smt_logict::storert<derivedt>::downcast(const irept &irep)
74
74
class smt_logic_const_downcast_visitort
75
75
{
76
76
public:
77
- #define LOGIC_ID (the_id ) virtual void visit (const smt_logic_##the_id##t &) = 0;
77
+ #define LOGIC_ID (the_id, the_name ) \
78
+ virtual void visit (const smt_logic_##the_id##t &) = 0;
78
79
#include " smt_logics.def"
79
80
#undef LOGIC_ID
80
81
};
Original file line number Diff line number Diff line change @@ -265,10 +265,13 @@ class smt_logic_to_string_convertert : public smt_logic_const_downcast_visitort
265
265
{
266
266
}
267
267
268
- void visit (const smt_logic_quantifier_free_bit_vectorst &) override
269
- {
270
- os << " QF_BV" ;
268
+ #define LOGIC_ID (the_id, the_name ) \
269
+ void visit (const smt_logic_##the_id##t &) override \
270
+ { \
271
+ os << #the_name; \
271
272
}
273
+ #include " smt_logics.def"
274
+ #undef LOGIC_ID
272
275
};
273
276
274
277
std::ostream &operator <<(std::ostream &os, const smt_logict &logic)
You can’t perform that action at this time.
0 commit comments