File tree Expand file tree Collapse file tree 3 files changed +4
-20
lines changed
regression/jbmc/NondetArrayPrimitive Expand file tree Collapse file tree 3 files changed +4
-20
lines changed Original file line number Diff line number Diff line change @@ -49,13 +49,6 @@ void byteArray(byte[] array)
49
49
}
50
50
}
51
51
52
- void boolArray (boolean [] array )
53
- {
54
- if (array != null && array .length > 1500 && array [1500 ] == true ) {
55
- assert false ;
56
- }
57
- }
58
-
59
52
void intArrayMulti (int [][] array )
60
53
{
61
54
if (array != null &&
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -1424,7 +1424,7 @@ void java_object_factoryt::gen_nondet_array_init(
1424
1424
init_array_expr =
1425
1425
typecast_exprt (init_array_expr, pointer_type (element_type));
1426
1426
1427
- if (element_type.id () == ID_pointer)
1427
+ if (element_type.id () == ID_pointer || element_type. id () == ID_c_bool )
1428
1428
{
1429
1429
// For arrays of non-primitive types, nondeterministically initialize each
1430
1430
// element of the array
@@ -1441,6 +1441,9 @@ void java_object_factoryt::gen_nondet_array_init(
1441
1441
else
1442
1442
{
1443
1443
// Arrays of primitive types can be initialized with a single instruction
1444
+ // We don't do this for arrays of Booleans, because Bools are represented
1445
+ // as bytes, so each cell must be initialized in a particular way (see
1446
+ // gen_nondet_init).
1444
1447
array_primitive_init_code (
1445
1448
assignments,
1446
1449
init_array_expr,
You can’t perform that action at this time.
0 commit comments