cprover
Loading...
Searching...
No Matches
smt_logics.cpp
Go to the documentation of this file.
1// Author: Diffblue Ltd.
2
4
5// Define the irep_idts for logics.
6#define LOGIC_ID(the_id, the_name) \
7 const irep_idt ID_smt_logic_##the_id{"smt_logic_" #the_id};
8#include <solvers/smt2_incremental/smt_logics.def>
9#undef LOGIC_ID
10
11bool smt_logict::operator==(const smt_logict &other) const
12{
13 return irept::operator==(other);
14}
15
16bool smt_logict::operator!=(const smt_logict &other) const
17{
18 return !(*this == other);
19}
20
21template <typename visitort>
22void accept(const smt_logict &logic, const irep_idt &id, visitort &&visitor)
23{
24#define LOGIC_ID(the_id, the_name) \
25 if(id == ID_smt_logic_##the_id) \
26 return visitor.visit(static_cast<const smt_logic_##the_id##t &>(logic));
27// The include below is marked as nolint because including the same file
28// multiple times is required as part of the x macro pattern.
29#include <solvers/smt2_incremental/smt_logics.def> // NOLINT(build/include)
30#undef LOGIC_ID
32}
33
38
40{
41 ::accept(*this, id(), std::move(visitor));
42}
43
44#define LOGIC_ID(the_id, the_name) \
45 smt_logic_##the_id##t::smt_logic_##the_id##t() \
46 : smt_logict{ID_smt_logic_##the_id} \
47 { \
48 }
49#include "smt_logics.def"
50#undef LOGIC_ID
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:564
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition dstring.h:37
bool operator==(const irept &other) const
Definition irep.cpp:146
void accept(smt_logic_const_downcast_visitort &) const
bool operator==(const smt_logict &) const
bool operator!=(const smt_logict &) const
void accept(const smt_logict &logic, const irep_idt &id, visitort &&visitor)
#define UNREACHABLE
This should be used to mark dead code.
Definition invariant.h:503