Skip to content

Commit 8e9a74a

Browse files
committed
Remove macro-definition of signed_greater_than_or_equal from X-macro.
Given that this was the last macro definition in `smt_bit_vector_theory.def`, also delete that file along with its usages in the header and implementation file.
1 parent 43bce36 commit 8e9a74a

File tree

3 files changed

+33
-43
lines changed

3 files changed

+33
-43
lines changed

src/solvers/smt2_incremental/smt_bit_vector_theory.cpp

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -19,30 +19,6 @@ static void validate_bit_vector_predicate_arguments(
1919
"Left and right operands must have the same bit width.");
2020
}
2121

22-
#define SMT_BITVECTOR_THEORY_PREDICATE(the_identifier, the_name) \
23-
void smt_bit_vector_theoryt::the_name##t::validate( \
24-
const smt_termt &left, const smt_termt &right) \
25-
{ \
26-
validate_bit_vector_predicate_arguments(left, right); \
27-
} \
28-
\
29-
smt_sortt smt_bit_vector_theoryt::the_name##t::return_sort( \
30-
const smt_termt &, const smt_termt &) \
31-
{ \
32-
return smt_bool_sortt{}; \
33-
} \
34-
\
35-
const char *smt_bit_vector_theoryt::the_name##t::identifier() \
36-
{ \
37-
return #the_identifier; \
38-
} \
39-
\
40-
const smt_function_application_termt::factoryt< \
41-
smt_bit_vector_theoryt::the_name##t> \
42-
smt_bit_vector_theoryt::the_name{};
43-
#include "smt_bit_vector_theory.def"
44-
#undef SMT_BITVECTOR_THEORY_PREDICATE
45-
4622
// Relational operator definitions
4723

4824
const char *smt_bit_vector_theoryt::unsigned_less_thant::identifier()
@@ -206,3 +182,26 @@ void smt_bit_vector_theoryt::signed_greater_thant::validate(
206182
const smt_function_application_termt::factoryt<
207183
smt_bit_vector_theoryt::signed_greater_thant>
208184
smt_bit_vector_theoryt::signed_greater_than{};
185+
186+
const char *smt_bit_vector_theoryt::signed_greater_than_or_equalt::identifier()
187+
{
188+
return "bvsge";
189+
}
190+
191+
smt_sortt smt_bit_vector_theoryt::signed_greater_than_or_equalt::return_sort(
192+
const smt_termt &lhs,
193+
const smt_termt &rhs)
194+
{
195+
return smt_bool_sortt{};
196+
}
197+
198+
void smt_bit_vector_theoryt::signed_greater_than_or_equalt::validate(
199+
const smt_termt &lhs,
200+
const smt_termt &rhs)
201+
{
202+
validate_bit_vector_predicate_arguments(lhs, rhs);
203+
}
204+
205+
const smt_function_application_termt::factoryt<
206+
smt_bit_vector_theoryt::signed_greater_than_or_equalt>
207+
smt_bit_vector_theoryt::signed_greater_than_or_equal{};

src/solvers/smt2_incremental/smt_bit_vector_theory.def

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/solvers/smt2_incremental/smt_bit_vector_theory.h

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,6 @@
88
class smt_bit_vector_theoryt
99
{
1010
public:
11-
#define SMT_BITVECTOR_THEORY_PREDICATE(the_identifier, the_name) \
12-
/* NOLINTNEXTLINE(readability/identifiers) cpplint does not match the ## */ \
13-
struct the_name##t final \
14-
{ \
15-
static const char *identifier(); \
16-
static smt_sortt \
17-
return_sort(const smt_termt &left, const smt_termt &right); \
18-
static void validate(const smt_termt &left, const smt_termt &right); \
19-
}; \
20-
static const smt_function_application_termt::factoryt<the_name##t> the_name;
21-
#include "smt_bit_vector_theory.def"
22-
#undef SMT_BITVECTOR_THEORY_PREDICATE
23-
2411
// Relational operator class declarations
2512
struct unsigned_less_thant final
2613
{
@@ -87,6 +74,16 @@ class smt_bit_vector_theoryt
8774
};
8875
static const smt_function_application_termt::factoryt<signed_greater_thant>
8976
signed_greater_than;
77+
78+
struct signed_greater_than_or_equalt final
79+
{
80+
static const char *identifier();
81+
static smt_sortt return_sort(const smt_termt &lhs, const smt_termt &rhs);
82+
static void validate(const smt_termt &lhs, const smt_termt &rhs);
83+
};
84+
static const smt_function_application_termt::factoryt<
85+
signed_greater_than_or_equalt>
86+
signed_greater_than_or_equal;
9087
};
9188

9289
#endif // CPROVER_SOLVERS_SMT2_INCREMENTAL_SMT_BIT_VECTOR_THEORY_H

0 commit comments

Comments
 (0)