Skip to content

Commit 58f9a9d

Browse files
authored
Merge pull request #6860 from tautschnig/cleanup/make_free_bv
Remove unused make_free_bv_expr
2 parents 8a9ab0c + ab7e173 commit 58f9a9d

File tree

3 files changed

+0
-47
lines changed

3 files changed

+0
-47
lines changed

src/solvers/flattening/boolbv.cpp

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,6 @@ bvt boolbvt::convert_bitvector(const exprt &expr)
121121
return convert_bv_typecast(to_typecast_expr(expr));
122122
else if(expr.id()==ID_symbol)
123123
return convert_symbol(to_symbol_expr(expr));
124-
else if(expr.id()==ID_bv_literals)
125-
return convert_bv_literals(expr);
126124
else if(expr.id()==ID_plus || expr.id()==ID_minus ||
127125
expr.id()=="no-overflow-plus" ||
128126
expr.id()=="no-overflow-minus")
@@ -275,27 +273,6 @@ bvt boolbvt::convert_array_comprehension(const array_comprehension_exprt &expr)
275273
return bv;
276274
}
277275

278-
bvt boolbvt::convert_bv_literals(const exprt &expr)
279-
{
280-
std::size_t width=boolbv_width(expr.type());
281-
282-
if(width==0)
283-
return conversion_failed(expr);
284-
285-
bvt bv;
286-
bv.resize(width);
287-
288-
const irept::subt &bv_sub=expr.find(ID_bv).get_sub();
289-
290-
if(bv_sub.size()!=width)
291-
throw "bv_literals with wrong size";
292-
293-
for(std::size_t i=0; i<width; i++)
294-
bv[i].set(unsafe_string2unsigned(id2string(bv_sub[i].id())));
295-
296-
return bv;
297-
}
298-
299276
bvt boolbvt::convert_symbol(const exprt &expr)
300277
{
301278
const typet &type=expr.type();
@@ -530,25 +507,6 @@ void boolbvt::set_to(const exprt &expr, bool value)
530507
SUB::set_to(expr, value);
531508
}
532509

533-
exprt boolbvt::make_bv_expr(const typet &type, const bvt &bv)
534-
{
535-
exprt dest(ID_bv_literals, type);
536-
irept::subt &bv_sub=dest.add(ID_bv).get_sub();
537-
bv_sub.resize(bv.size());
538-
539-
for(std::size_t i=0; i<bv.size(); i++)
540-
bv_sub[i].id(std::to_string(bv[i].get()));
541-
return dest;
542-
}
543-
544-
exprt boolbvt::make_free_bv_expr(const typet &type)
545-
{
546-
const std::size_t width = boolbv_width(type);
547-
PRECONDITION(width != 0);
548-
bvt bv = prop.new_variables(width);
549-
return make_bv_expr(type, bv);
550-
}
551-
552510
bool boolbvt::is_unbounded_array(const typet &type) const
553511
{
554512
if(type.id()!=ID_array)

src/solvers/flattening/boolbv.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ class boolbvt:public arrayst
187187
virtual bvt convert_abs(const abs_exprt &expr);
188188
virtual bvt convert_concatenation(const concatenation_exprt &expr);
189189
virtual bvt convert_replication(const replication_exprt &expr);
190-
virtual bvt convert_bv_literals(const exprt &expr);
191190
virtual bvt convert_constant(const constant_exprt &expr);
192191
virtual bvt convert_extractbits(const extractbits_exprt &expr);
193192
virtual bvt convert_symbol(const exprt &expr);
@@ -199,9 +198,6 @@ class boolbvt:public arrayst
199198
virtual bvt convert_bitreverse(const bitreverse_exprt &expr);
200199
virtual bvt convert_saturating_add_sub(const binary_exprt &expr);
201200

202-
virtual exprt make_bv_expr(const typet &type, const bvt &bv);
203-
virtual exprt make_free_bv_expr(const typet &type);
204-
205201
void convert_with(
206202
const typet &type,
207203
const exprt &op1,

src/util/irep_ids.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,6 @@ IREP_ID_ONE(KnR)
300300
IREP_ID_TWO(C_KnR, #KnR)
301301
IREP_ID_ONE(constraint_select_one)
302302
IREP_ID_ONE(cond)
303-
IREP_ID_ONE(bv_literals)
304303
IREP_ID_ONE(isfinite)
305304
IREP_ID_ONE(isinf)
306305
IREP_ID_ONE(isnormal)

0 commit comments

Comments
 (0)