|
11 | 11 |
|
12 | 12 | #include "goto_check_c.h"
|
13 | 13 |
|
14 |
| -#include <algorithm> |
15 |
| -#include <optional> |
16 |
| - |
17 | 14 | #include <util/arith_tools.h>
|
18 | 15 | #include <util/array_name.h>
|
19 | 16 | #include <util/bitvector_expr.h>
|
|
37 | 34 | #include <util/std_code.h>
|
38 | 35 | #include <util/std_expr.h>
|
39 | 36 |
|
40 |
| -#include <langapi/language.h> |
41 |
| -#include <langapi/mode.h> |
42 |
| - |
43 | 37 | #include <goto-programs/goto_model.h>
|
44 | 38 | #include <goto-programs/remove_skip.h>
|
45 | 39 |
|
46 |
| -#include "local_bitvector_analysis.h" |
| 40 | +#include <analyses/local_bitvector_analysis.h> |
| 41 | +#include <langapi/language.h> |
| 42 | +#include <langapi/mode.h> |
| 43 | + |
| 44 | +#include <algorithm> |
| 45 | +#include <optional> |
47 | 46 |
|
48 | 47 | class goto_check_ct
|
49 | 48 | {
|
@@ -986,11 +985,12 @@ void goto_check_ct::integer_overflow_check(
|
986 | 985 | // a shift of zero isn't overflow;
|
987 | 986 | // else check the top bits
|
988 | 987 | add_guarded_property(
|
989 |
| - disjunction({neg_value_shift, |
990 |
| - neg_dist_shift, |
991 |
| - dist_too_large, |
992 |
| - op_zero, |
993 |
| - top_bits_zero}), |
| 988 | + disjunction( |
| 989 | + {neg_value_shift, |
| 990 | + neg_dist_shift, |
| 991 | + dist_too_large, |
| 992 | + op_zero, |
| 993 | + top_bits_zero}), |
994 | 994 | "arithmetic overflow on signed shl",
|
995 | 995 | "overflow",
|
996 | 996 | expr.find_source_location(),
|
@@ -1554,9 +1554,10 @@ void goto_check_ct::bounds_check_index(
|
1554 | 1554 | exprt p_offset =
|
1555 | 1555 | pointer_offset(to_dereference_expr(ode.root_object()).pointer());
|
1556 | 1556 |
|
1557 |
| - effective_offset = plus_exprt{p_offset, |
1558 |
| - typecast_exprt::conditional_cast( |
1559 |
| - effective_offset, p_offset.type())}; |
| 1557 | + effective_offset = plus_exprt{ |
| 1558 | + p_offset, |
| 1559 | + typecast_exprt::conditional_cast( |
| 1560 | + effective_offset, p_offset.type())}; |
1560 | 1561 | }
|
1561 | 1562 |
|
1562 | 1563 | exprt zero = from_integer(0, ode.offset().type());
|
@@ -1825,9 +1826,10 @@ bool goto_check_ct::check_rec_member(
|
1825 | 1826 | deref.pointer(), pointer_type(char_type()));
|
1826 | 1827 |
|
1827 | 1828 | const exprt new_address_casted = typecast_exprt::conditional_cast(
|
1828 |
| - plus_exprt{char_pointer, |
1829 |
| - typecast_exprt::conditional_cast( |
1830 |
| - member_offset_opt.value(), pointer_diff_type())}, |
| 1829 | + plus_exprt{ |
| 1830 | + char_pointer, |
| 1831 | + typecast_exprt::conditional_cast( |
| 1832 | + member_offset_opt.value(), pointer_diff_type())}, |
1831 | 1833 | new_pointer_type);
|
1832 | 1834 |
|
1833 | 1835 | dereference_exprt new_deref{new_address_casted};
|
@@ -2368,8 +2370,9 @@ goto_check_ct::get_pointer_is_null_condition(
|
2368 | 2370 | if(flags.is_unknown() || flags.is_uninitialized() || flags.is_null())
|
2369 | 2371 | {
|
2370 | 2372 | return {conditiont{
|
2371 |
| - or_exprt{is_in_bounds_of_some_explicit_allocation(address, size), |
2372 |
| - not_exprt(null_pointer(address))}, |
| 2373 | + or_exprt{ |
| 2374 | + is_in_bounds_of_some_explicit_allocation(address, size), |
| 2375 | + not_exprt(null_pointer(address))}, |
2373 | 2376 | "pointer NULL"}};
|
2374 | 2377 | }
|
2375 | 2378 |
|
|
0 commit comments