File tree 4 files changed +6
-6
lines changed
4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ static exprt simplify_json_expr(const exprt &src)
53
53
}
54
54
else if (
55
55
object.id () == ID_index && to_index_expr (object).index ().is_constant () &&
56
- to_constant_expr (to_index_expr (object).index ()).value_is_zero_string ())
56
+ to_constant_expr (to_index_expr (object).index ()).is_zero ())
57
57
{
58
58
// simplify expressions of the form &array[0]
59
59
return simplify_json_expr (to_index_expr (object).array ());
Original file line number Diff line number Diff line change @@ -777,7 +777,7 @@ simplify_exprt::simplify_bitwise(const multi_ary_exprt &expr)
777
777
}
778
778
else if (
779
779
it->is_constant () && it->type ().id () == ID_bv &&
780
- to_constant_expr ( *it). value_is_zero_string () &&
780
+ *it == to_bv_type (it-> type ()). all_zeros_expr () &&
781
781
new_expr.operands ().size () > 1 )
782
782
{
783
783
it = new_expr.operands ().erase (it);
Original file line number Diff line number Diff line change @@ -3005,8 +3005,6 @@ class constant_exprt : public nullary_exprt
3005
3005
set (ID_value, value);
3006
3006
}
3007
3007
3008
- bool value_is_zero_string () const ;
3009
-
3010
3008
// / Returns true if \p expr has a pointer type and a value NULL; it also
3011
3009
// / returns true when \p expr has value zero and NULL_is_zero is true; returns
3012
3010
// / false in all other cases.
@@ -3023,6 +3021,9 @@ class constant_exprt : public nullary_exprt
3023
3021
{
3024
3022
check (expr, vm);
3025
3023
}
3024
+
3025
+ protected:
3026
+ bool value_is_zero_string () const ;
3026
3027
};
3027
3028
3028
3029
template <>
Original file line number Diff line number Diff line change @@ -172,8 +172,7 @@ SCENARIO(
172
172
const symbol_exprt object_symbol =
173
173
to_symbol_expr (object_descriptor->object ());
174
174
REQUIRE (object_symbol.get_identifier () == " int_value!0" );
175
- REQUIRE (to_constant_expr (object_descriptor->offset ())
176
- .value_is_zero_string ());
175
+ REQUIRE (to_constant_expr (object_descriptor->offset ()).is_zero ());
177
176
}
178
177
THEN (" The target equations are unchanged" )
179
178
{
You can’t perform that action at this time.
0 commit comments