@@ -57,7 +57,6 @@ smt2_convt::smt2_convt(
57
57
solvert _solver,
58
58
std::ostream &_out)
59
59
: use_FPA_theory(false ),
60
- use_array_of_bool(false ),
61
60
use_as_const(false ),
62
61
use_check_sat_assuming(false ),
63
62
use_datatypes(false ),
@@ -86,7 +85,6 @@ smt2_convt::smt2_convt(
86
85
87
86
case solvert::CPROVER_SMT2:
88
87
use_FPA_theory = true ;
89
- use_array_of_bool = true ;
90
88
use_as_const = true ;
91
89
use_check_sat_assuming = true ;
92
90
emit_set_logic = false ;
@@ -106,7 +104,6 @@ smt2_convt::smt2_convt(
106
104
break ;
107
105
108
106
case solvert::Z3:
109
- use_array_of_bool = true ;
110
107
use_as_const = true ;
111
108
use_check_sat_assuming = true ;
112
109
use_lambda_for_array = true ;
@@ -3895,24 +3892,11 @@ void smt2_convt::convert_index(const index_exprt &expr)
3895
3892
3896
3893
if (use_array_theory (expr.array ()))
3897
3894
{
3898
- if (expr.type ().id () == ID_bool && !use_array_of_bool)
3899
- {
3900
- out << " (= " ;
3901
- out << " (select " ;
3902
- convert_expr (expr.array ());
3903
- out << " " ;
3904
- convert_expr (typecast_exprt (expr.index (), array_type.size ().type ()));
3905
- out << " )" ;
3906
- out << " #b1)" ;
3907
- }
3908
- else
3909
- {
3910
- out << " (select " ;
3911
- convert_expr (expr.array ());
3912
- out << " " ;
3913
- convert_expr (typecast_exprt (expr.index (), array_type.size ().type ()));
3914
- out << " )" ;
3915
- }
3895
+ out << " (select " ;
3896
+ convert_expr (expr.array ());
3897
+ out << " " ;
3898
+ convert_expr (typecast_exprt (expr.index (), array_type.size ().type ()));
3899
+ out << " )" ;
3916
3900
}
3917
3901
else
3918
3902
{
@@ -4455,16 +4439,7 @@ void smt2_convt::find_symbols(const exprt &expr)
4455
4439
out << " (assert (forall ((i " ;
4456
4440
convert_type (array_type.size ().type ());
4457
4441
out << " )) (= (select " << id << " i) " ;
4458
- if (array_type.subtype ().id () == ID_bool && !use_array_of_bool)
4459
- {
4460
- out << " (ite " ;
4461
- convert_expr (array_of.what ());
4462
- out << " #b1 #b0)" ;
4463
- }
4464
- else
4465
- {
4466
- convert_expr (array_of.what ());
4467
- }
4442
+ convert_expr (array_of.what ());
4468
4443
out << " )))\n " ;
4469
4444
4470
4445
defined_expressions[expr] = id;
@@ -4503,16 +4478,7 @@ void smt2_convt::find_symbols(const exprt &expr)
4503
4478
out << " )) (= (select " << id << " " ;
4504
4479
convert_expr (array_comprehension.arg ());
4505
4480
out << " ) " ;
4506
- if (array_type.subtype ().id () == ID_bool && !use_array_of_bool)
4507
- {
4508
- out << " (ite " ;
4509
- convert_expr (array_comprehension.body ());
4510
- out << " #b1 #b0)" ;
4511
- }
4512
- else
4513
- {
4514
- convert_expr (array_comprehension.body ());
4515
- }
4481
+ convert_expr (array_comprehension.body ());
4516
4482
out << " ))))\n " ;
4517
4483
4518
4484
defined_expressions[expr] = id;
@@ -4536,16 +4502,7 @@ void smt2_convt::find_symbols(const exprt &expr)
4536
4502
out << " (assert (= (select " << id << " " ;
4537
4503
convert_expr (from_integer (i, array_type.size ().type ()));
4538
4504
out << " ) " ; // select
4539
- if (array_type.subtype ().id () == ID_bool && !use_array_of_bool)
4540
- {
4541
- out << " (ite " ;
4542
- convert_expr (expr.operands ()[i]);
4543
- out << " #b1 #b0)" ;
4544
- }
4545
- else
4546
- {
4547
- convert_expr (expr.operands ()[i]);
4548
- }
4505
+ convert_expr (expr.operands ()[i]);
4549
4506
out << " ))" << " \n " ; // =, assert
4550
4507
}
4551
4508
@@ -4690,16 +4647,11 @@ void smt2_convt::convert_type(const typet &type)
4690
4647
CHECK_RETURN (array_type.size ().is_not_nil ());
4691
4648
4692
4649
// we always use array theory for top-level arrays
4693
- const typet &subtype = array_type.subtype ();
4694
-
4695
4650
out << " (Array " ;
4696
4651
convert_type (array_type.size ().type ());
4697
4652
out << " " ;
4698
4653
4699
- if (subtype.id ()==ID_bool && !use_array_of_bool)
4700
- out << " (_ BitVec 1)" ;
4701
- else
4702
- convert_type (array_type.subtype ());
4654
+ convert_type (array_type.subtype ());
4703
4655
4704
4656
out << " )" ;
4705
4657
}
0 commit comments