Skip to content

Commit ccfbaee

Browse files
committed
Add larger selection of SMT logics
We almost certainly don't need all of these in the near future, but having the data structures for them available will make it straight forward to experiment with different options.
1 parent 2f27da4 commit ccfbaee

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/solvers/smt2_incremental/smt_logics.def

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,9 @@
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_uninterpreted_functions, QF_UF)
910
LOGIC_ID(quantifier_free_bit_vectors, QF_BV)
11+
LOGIC_ID(quantifier_free_uninterpreted_functions_bit_vectors, QF_UFBV)
12+
LOGIC_ID(quantifier_free_bit_vectors_arrays, QF_ABV)
13+
LOGIC_ID(quantifier_free_uninterpreted_functions_bit_vectors_arrays, QF_AUFBV)
14+
LOGIC_ID(all, ALL)

unit/solvers/smt2_incremental/smt_to_smt2_string.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,19 @@ TEST_CASE(
137137
"Test smt_set_logic_commandt to string conversion",
138138
"[core][smt2_incremental]")
139139
{
140-
const smt_logic_quantifier_free_bit_vectorst qf_bv;
140+
const auto qf_uf = smt_logic_quantifier_free_uninterpreted_functionst{};
141+
CHECK(smt_to_smt2_string(qf_uf) == "QF_UF");
142+
const auto qf_bv = smt_logic_quantifier_free_bit_vectorst{};
141143
CHECK(smt_to_smt2_string(qf_bv) == "QF_BV");
144+
const auto qf_ufbv =
145+
smt_logic_quantifier_free_uninterpreted_functions_bit_vectorst{};
146+
CHECK(smt_to_smt2_string(qf_ufbv) == "QF_UFBV");
147+
const auto qf_abv = smt_logic_quantifier_free_bit_vectors_arrayst{};
148+
CHECK(smt_to_smt2_string(qf_abv) == "QF_ABV");
149+
const auto qf_aufbv =
150+
smt_logic_quantifier_free_uninterpreted_functions_bit_vectors_arrayst{};
151+
CHECK(smt_to_smt2_string(qf_aufbv) == "QF_AUFBV");
152+
CHECK(smt_to_smt2_string(smt_logic_allt{}) == "ALL");
142153
CHECK(
143154
smt_to_smt2_string(smt_set_logic_commandt{qf_bv}) == "(set-logic QF_BV)");
144155
}

0 commit comments

Comments
 (0)