@@ -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 ;
@@ -4070,24 +4066,11 @@ void smt2_convt::convert_index(const index_exprt &expr)
4070
4066
4071
4067
if (use_array_theory (expr.array ()))
4072
4068
{
4073
- if (expr.type ().id () == ID_bool && !use_array_of_bool)
4074
- {
4075
- out << " (= " ;
4076
- out << " (select " ;
4077
- convert_expr (expr.array ());
4078
- out << " " ;
4079
- convert_expr (typecast_exprt (expr.index (), array_type.size ().type ()));
4080
- out << " )" ;
4081
- out << " #b1)" ;
4082
- }
4083
- else
4084
- {
4085
- out << " (select " ;
4086
- convert_expr (expr.array ());
4087
- out << " " ;
4088
- convert_expr (typecast_exprt (expr.index (), array_type.size ().type ()));
4089
- out << " )" ;
4090
- }
4069
+ out << " (select " ;
4070
+ convert_expr (expr.array ());
4071
+ out << " " ;
4072
+ convert_expr (typecast_exprt (expr.index (), array_type.size ().type ()));
4073
+ out << " )" ;
4091
4074
}
4092
4075
else
4093
4076
{
@@ -4644,16 +4627,7 @@ void smt2_convt::find_symbols(const exprt &expr)
4644
4627
out << " (assert (forall ((i " ;
4645
4628
convert_type (array_type.size ().type ());
4646
4629
out << " )) (= (select " << id << " i) " ;
4647
- if (array_type.element_type ().id () == ID_bool && !use_array_of_bool)
4648
- {
4649
- out << " (ite " ;
4650
- convert_expr (array_of.what ());
4651
- out << " #b1 #b0)" ;
4652
- }
4653
- else
4654
- {
4655
- convert_expr (array_of.what ());
4656
- }
4630
+ convert_expr (array_of.what ());
4657
4631
out << " )))\n " ;
4658
4632
4659
4633
defined_expressions[expr] = id;
@@ -4692,16 +4666,7 @@ void smt2_convt::find_symbols(const exprt &expr)
4692
4666
out << " )) (= (select " << id << " " ;
4693
4667
convert_expr (array_comprehension.arg ());
4694
4668
out << " ) " ;
4695
- if (array_type.element_type ().id () == ID_bool && !use_array_of_bool)
4696
- {
4697
- out << " (ite " ;
4698
- convert_expr (array_comprehension.body ());
4699
- out << " #b1 #b0)" ;
4700
- }
4701
- else
4702
- {
4703
- convert_expr (array_comprehension.body ());
4704
- }
4669
+ convert_expr (array_comprehension.body ());
4705
4670
out << " ))))\n " ;
4706
4671
4707
4672
defined_expressions[expr] = id;
@@ -4725,16 +4690,7 @@ void smt2_convt::find_symbols(const exprt &expr)
4725
4690
out << " (assert (= (select " << id << " " ;
4726
4691
convert_expr (from_integer (i, array_type.size ().type ()));
4727
4692
out << " ) " ; // select
4728
- if (array_type.element_type ().id () == ID_bool && !use_array_of_bool)
4729
- {
4730
- out << " (ite " ;
4731
- convert_expr (expr.operands ()[i]);
4732
- out << " #b1 #b0)" ;
4733
- }
4734
- else
4735
- {
4736
- convert_expr (expr.operands ()[i]);
4737
- }
4693
+ convert_expr (expr.operands ()[i]);
4738
4694
out << " ))" << " \n " ; // =, assert
4739
4695
}
4740
4696
@@ -4879,17 +4835,10 @@ void smt2_convt::convert_type(const typet &type)
4879
4835
CHECK_RETURN (array_type.size ().is_not_nil ());
4880
4836
4881
4837
// we always use array theory for top-level arrays
4882
- const typet &subtype = array_type.element_type ();
4883
-
4884
4838
out << " (Array " ;
4885
4839
convert_type (array_type.size ().type ());
4886
4840
out << " " ;
4887
-
4888
- if (subtype.id ()==ID_bool && !use_array_of_bool)
4889
- out << " (_ BitVec 1)" ;
4890
- else
4891
- convert_type (array_type.element_type ());
4892
-
4841
+ convert_type (array_type.element_type ());
4893
4842
out << " )" ;
4894
4843
}
4895
4844
else if (type.id ()==ID_bool)
0 commit comments