File tree Expand file tree Collapse file tree 4 files changed +13
-9
lines changed
src/solvers/smt2_incremental Expand file tree Collapse file tree 4 files changed +13
-9
lines changed Original file line number Diff line number Diff line change 33#include < solvers/smt2_incremental/smt_logics.h>
44
55// Define the irep_idts for logics.
6- #define LOGIC_ID (the_id ) \
6+ #define LOGIC_ID (the_id, the_name ) \
77 const irep_idt ID_smt_logic_##the_id{" smt_logic_" #the_id};
88#include < solvers/smt2_incremental/smt_logics.def>
99#undef LOGIC_ID
@@ -21,7 +21,7 @@ bool smt_logict::operator!=(const smt_logict &other) const
2121template <typename visitort>
2222void accept (const smt_logict &logic, const irep_idt &id, visitort &&visitor)
2323{
24- #define LOGIC_ID (the_id ) \
24+ #define LOGIC_ID (the_id, the_name ) \
2525 if (id == ID_smt_logic_##the_id) \
2626 return visitor.visit (static_cast <const smt_logic_##the_id##t &>(logic));
2727// 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
4141 ::accept (*this , id(), std::move(visitor));
4242}
4343
44- #define LOGIC_ID (the_id ) \
44+ #define LOGIC_ID (the_id, the_name ) \
4545 smt_logic_##the_id##t::smt_logic_##the_id##t() \
4646 : smt_logict{ID_smt_logic_##the_id} \
4747 { \
Original file line number Diff line number Diff line change 66/// * The constant `irep_idt`s used to identify each of the logic classes.
77/// * The member functions of the `smt_logic_const_downcast_visitort` class.
88/// * 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)
6161 return static_cast <const smt_logict &>(irep);
6262}
6363
64- #define LOGIC_ID (the_id ) \
64+ #define LOGIC_ID (the_id, the_name ) \
6565 /* NOLINTNEXTLINE(readability/identifiers) cpplint does not match the ## */ \
6666 class smt_logic_ ##the_id##t : public smt_logict \
6767 { \
@@ -74,7 +74,8 @@ const smt_logict &smt_logict::storert<derivedt>::downcast(const irept &irep)
7474class smt_logic_const_downcast_visitort
7575{
7676public:
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;
7879#include " smt_logics.def"
7980#undef LOGIC_ID
8081};
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
265265 {
266266 }
267267
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; \
271272 }
273+ #include " smt_logics.def"
274+ #undef LOGIC_ID
272275};
273276
274277std::ostream &operator <<(std::ostream &os, const smt_logict &logic)
You can’t perform that action at this time.
0 commit comments