@@ -59,7 +59,6 @@ smt2_convt::smt2_convt(
59
59
solvert _solver,
60
60
std::ostream &_out)
61
61
: use_FPA_theory(false ),
62
- use_array_of_bool(false ),
63
62
use_as_const(false ),
64
63
use_check_sat_assuming(false ),
65
64
use_datatypes(false ),
@@ -88,7 +87,6 @@ smt2_convt::smt2_convt(
88
87
89
88
case solvert::CPROVER_SMT2:
90
89
use_FPA_theory = true ;
91
- use_array_of_bool = true ;
92
90
use_as_const = true ;
93
91
use_check_sat_assuming = true ;
94
92
emit_set_logic = false ;
@@ -99,7 +97,6 @@ smt2_convt::smt2_convt(
99
97
100
98
case solvert::CVC4:
101
99
logic = " ALL" ;
102
- use_array_of_bool = true ;
103
100
use_as_const = true ;
104
101
break ;
105
102
@@ -110,7 +107,6 @@ smt2_convt::smt2_convt(
110
107
break ;
111
108
112
109
case solvert::Z3:
113
- use_array_of_bool = true ;
114
110
use_as_const = true ;
115
111
use_check_sat_assuming = true ;
116
112
use_lambda_for_array = true ;
@@ -4059,24 +4055,11 @@ void smt2_convt::convert_index(const index_exprt &expr)
4059
4055
4060
4056
if (use_array_theory (expr.array ()))
4061
4057
{
4062
- if (expr.type ().id () == ID_bool && !use_array_of_bool)
4063
- {
4064
- out << " (= " ;
4065
- out << " (select " ;
4066
- convert_expr (expr.array ());
4067
- out << " " ;
4068
- convert_expr (typecast_exprt (expr.index (), array_type.size ().type ()));
4069
- out << " )" ;
4070
- out << " #b1)" ;
4071
- }
4072
- else
4073
- {
4074
- out << " (select " ;
4075
- convert_expr (expr.array ());
4076
- out << " " ;
4077
- convert_expr (typecast_exprt (expr.index (), array_type.size ().type ()));
4078
- out << " )" ;
4079
- }
4058
+ out << " (select " ;
4059
+ convert_expr (expr.array ());
4060
+ out << " " ;
4061
+ convert_expr (typecast_exprt (expr.index (), array_type.size ().type ()));
4062
+ out << " )" ;
4080
4063
}
4081
4064
else
4082
4065
{
@@ -4630,16 +4613,7 @@ void smt2_convt::find_symbols(const exprt &expr)
4630
4613
out << " (assert (forall ((i " ;
4631
4614
convert_type (array_type.size ().type ());
4632
4615
out << " )) (= (select " << id << " i) " ;
4633
- if (array_type.subtype ().id () == ID_bool && !use_array_of_bool)
4634
- {
4635
- out << " (ite " ;
4636
- convert_expr (array_of.what ());
4637
- out << " #b1 #b0)" ;
4638
- }
4639
- else
4640
- {
4641
- convert_expr (array_of.what ());
4642
- }
4616
+ convert_expr (array_of.what ());
4643
4617
out << " )))\n " ;
4644
4618
4645
4619
defined_expressions[expr] = id;
@@ -4678,16 +4652,7 @@ void smt2_convt::find_symbols(const exprt &expr)
4678
4652
out << " )) (= (select " << id << " " ;
4679
4653
convert_expr (array_comprehension.arg ());
4680
4654
out << " ) " ;
4681
- if (array_type.subtype ().id () == ID_bool && !use_array_of_bool)
4682
- {
4683
- out << " (ite " ;
4684
- convert_expr (array_comprehension.body ());
4685
- out << " #b1 #b0)" ;
4686
- }
4687
- else
4688
- {
4689
- convert_expr (array_comprehension.body ());
4690
- }
4655
+ convert_expr (array_comprehension.body ());
4691
4656
out << " ))))\n " ;
4692
4657
4693
4658
defined_expressions[expr] = id;
@@ -4711,16 +4676,7 @@ void smt2_convt::find_symbols(const exprt &expr)
4711
4676
out << " (assert (= (select " << id << " " ;
4712
4677
convert_expr (from_integer (i, array_type.size ().type ()));
4713
4678
out << " ) " ; // select
4714
- if (array_type.subtype ().id () == ID_bool && !use_array_of_bool)
4715
- {
4716
- out << " (ite " ;
4717
- convert_expr (expr.operands ()[i]);
4718
- out << " #b1 #b0)" ;
4719
- }
4720
- else
4721
- {
4722
- convert_expr (expr.operands ()[i]);
4723
- }
4679
+ convert_expr (expr.operands ()[i]);
4724
4680
out << " ))" << " \n " ; // =, assert
4725
4681
}
4726
4682
@@ -4865,16 +4821,11 @@ void smt2_convt::convert_type(const typet &type)
4865
4821
CHECK_RETURN (array_type.size ().is_not_nil ());
4866
4822
4867
4823
// we always use array theory for top-level arrays
4868
- const typet &subtype = array_type.subtype ();
4869
-
4870
4824
out << " (Array " ;
4871
4825
convert_type (array_type.size ().type ());
4872
4826
out << " " ;
4873
4827
4874
- if (subtype.id ()==ID_bool && !use_array_of_bool)
4875
- out << " (_ BitVec 1)" ;
4876
- else
4877
- convert_type (array_type.subtype ());
4828
+ convert_type (array_type.subtype ());
4878
4829
4879
4830
out << " )" ;
4880
4831
}
0 commit comments