@@ -171,8 +171,7 @@ TEST_CASE(
171
171
test.sent_commands ==
172
172
std::vector<smt_commandt>{
173
173
smt_set_option_commandt{smt_option_produce_modelst{true }},
174
- smt_set_logic_commandt{// NOLINTNEXTLINE(whitespace/line_length)
175
- smt_logic_allt{}},
174
+ smt_set_logic_commandt{smt_logic_allt{}},
176
175
test.object_size_function .declaration });
177
176
test.sent_commands .clear ();
178
177
SECTION (" Set symbol to true." )
@@ -616,4 +615,34 @@ TEST_CASE(
616
615
foo_term, smt_array_theoryt::select (array_term, index_term))}};
617
616
REQUIRE (test.sent_commands == expected_commands);
618
617
}
618
+ SECTION (" array_of_exprt - all elements set to a given value" )
619
+ {
620
+ const array_of_exprt array_of_expr{
621
+ from_integer (42 , value_type), array_type};
622
+ test.sent_commands .clear ();
623
+ test.procedure .set_to (
624
+ equal_exprt{
625
+ foo.symbol_expr (), index_exprt{array_of_expr, index.symbol_expr ()}},
626
+ true );
627
+ const auto foo_term = smt_identifier_termt{" foo" , smt_bit_vector_sortt{8 }};
628
+ const auto array_term = smt_identifier_termt{
629
+ " array_0" ,
630
+ smt_array_sortt{smt_bit_vector_sortt{32 }, smt_bit_vector_sortt{8 }}};
631
+ const auto index_term =
632
+ smt_identifier_termt{" index" , smt_bit_vector_sortt{32 }};
633
+ const auto forall_term =
634
+ smt_identifier_termt{" array_0_index" , smt_bit_vector_sortt{32 }};
635
+ const std::vector<smt_commandt> expected_commands{
636
+ smt_declare_function_commandt{foo_term, {}},
637
+ smt_declare_function_commandt{array_term, {}},
638
+ smt_assert_commandt{smt_forall_termt{
639
+ {forall_term},
640
+ smt_core_theoryt::equal (
641
+ smt_array_theoryt::select (array_term, forall_term),
642
+ smt_bit_vector_constant_termt{42 , 8 })}},
643
+ smt_declare_function_commandt{index_term, {}},
644
+ smt_assert_commandt{smt_core_theoryt::equal (
645
+ foo_term, smt_array_theoryt::select (array_term, index_term))}};
646
+ REQUIRE (test.sent_commands == expected_commands);
647
+ }
619
648
}
0 commit comments