Skip to content

Commit 366989f

Browse files
authored
Merge pull request #6008 from tautschnig/no-width
Remove ID_width expression support from solvers
2 parents 6e88f92 + ffd00f0 commit 366989f

File tree

2 files changed

+0
-30
lines changed

2 files changed

+0
-30
lines changed

src/solvers/flattening/boolbv.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -109,25 +109,6 @@ bvt boolbvt::convert_bitvector(const exprt &expr)
109109
return convert_with(to_with_expr(expr));
110110
else if(expr.id()==ID_update)
111111
return convert_update(to_update_expr(expr));
112-
else if(expr.id()==ID_width)
113-
{
114-
std::size_t result_width=boolbv_width(expr.type());
115-
116-
if(result_width==0)
117-
return conversion_failed(expr);
118-
119-
if(expr.operands().size()!=1)
120-
return conversion_failed(expr);
121-
122-
std::size_t op_width = boolbv_width(to_unary_expr(expr).op().type());
123-
124-
if(op_width==0)
125-
return conversion_failed(expr);
126-
127-
if(expr.type().id()==ID_unsignedbv ||
128-
expr.type().id()==ID_signedbv)
129-
return bv_utils.build_constant(op_width/8, result_width);
130-
}
131112
else if(expr.id()==ID_case)
132113
return convert_case(expr);
133114
else if(expr.id()==ID_cond)

src/solvers/smt2/smt2_conv.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1613,17 +1613,6 @@ void smt2_convt::convert_expr(const exprt &expr)
16131613
INVARIANT(
16141614
false, "byte_update ops should be lowered in prepare_for_convert_expr");
16151615
}
1616-
else if(expr.id()==ID_width)
1617-
{
1618-
std::size_t result_width=boolbv_width(expr.type());
1619-
CHECK_RETURN(result_width != 0);
1620-
1621-
std::size_t op_width = boolbv_width(to_unary_expr(expr).op().type());
1622-
CHECK_RETURN(op_width != 0);
1623-
1624-
out << "(_ bv" << op_width/8
1625-
<< " " << result_width << ")";
1626-
}
16271616
else if(expr.id()==ID_abs)
16281617
{
16291618
const abs_exprt &abs_expr = to_abs_expr(expr);

0 commit comments

Comments
 (0)