Skip to content

Commit 5fdb524

Browse files
authored
Merge pull request #6146 from tautschnig/convert
bv_pointerst: use convert instead of convert_bv for Boolean expression
2 parents 78a08ce + 38a7486 commit 5fdb524

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/solvers/flattening/bv_pointers.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,7 @@ bvt bv_pointerst::convert_bitvector(const exprt &expr)
546546
// do the same-object-test via an expression as this may permit re-using
547547
// already cached encodings of the equality test
548548
const exprt same_object = ::same_object(minus_expr.lhs(), minus_expr.rhs());
549-
const bvt &same_object_bv = convert_bv(same_object);
550-
CHECK_RETURN(same_object_bv.size() == 1);
549+
const literalt same_object_lit = convert(same_object);
551550

552551
// compute the object size (again, possibly using cached results)
553552
const exprt object_size = ::object_size(minus_expr.lhs());
@@ -556,7 +555,7 @@ bvt bv_pointerst::convert_bitvector(const exprt &expr)
556555

557556
bvt bv = prop.new_variables(width);
558557

559-
if(!same_object_bv[0].is_false())
558+
if(!same_object_lit.is_false())
560559
{
561560
const pointer_typet &lhs_pt = to_pointer_type(minus_expr.lhs().type());
562561
const bvt &lhs = convert_bv(minus_expr.lhs());
@@ -604,7 +603,7 @@ bvt bv_pointerst::convert_bitvector(const exprt &expr)
604603
}
605604

606605
prop.l_set_to_true(prop.limplies(
607-
prop.land(same_object_bv[0], prop.land(lhs_in_bounds, rhs_in_bounds)),
606+
prop.land(same_object_lit, prop.land(lhs_in_bounds, rhs_in_bounds)),
608607
bv_utils.equal(difference, bv)));
609608
}
610609

0 commit comments

Comments
 (0)