Skip to content

Commit f43f9a2

Browse files
committed
Add support for incremental SMT traces containing C_bool
An "unsupported type" invariant violation would previously have been encountered when attempting to generate traces featuring `c_bool_typet`. This is due to `c_bool_typet` not being castable to `integer_bitvector_typet`.
1 parent f2240be commit f43f9a2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/solvers/smt2_incremental/construct_value_expr_from_smt.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,12 @@ class value_expr_from_smt_factoryt : public smt_term_const_downcast_visitort
3838
void visit(const smt_bit_vector_constant_termt &bit_vector_constant) override
3939
{
4040
if(
41-
const auto integer_type =
42-
type_try_dynamic_cast<integer_bitvector_typet>(type_to_construct))
41+
const auto bitvector_type =
42+
type_try_dynamic_cast<bitvector_typet>(type_to_construct))
4343
{
4444
INVARIANT(
45-
integer_type->get_width() == bit_vector_constant.get_sort().bit_width(),
45+
bitvector_type->get_width() ==
46+
bit_vector_constant.get_sort().bit_width(),
4647
"Width of smt bit vector term must match the width of bit vector "
4748
"type.");
4849
result = from_integer(bit_vector_constant.value(), type_to_construct);

0 commit comments

Comments
 (0)