Skip to content

Commit 65af890

Browse files
author
Joel Allred
committed
Test for multi-dim array
Loop-less init: check that innermost array doesn't require unwind
1 parent 997d692 commit 65af890

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed
Binary file not shown.

jbmc/regression/jbmc/NondetArrayPrimitive/NondetArrayPrimitive.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,15 @@ void floatArray(float[] array)
1313
assert false;
1414
}
1515
}
16+
17+
void intArrayMulti(int[][] array)
18+
{
19+
if (array != null &&
20+
array.length > 2 &&
21+
array[2].length > 50 &&
22+
array[2][50] == 42) {
23+
assert false;
24+
}
25+
}
26+
1627
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
CORE
2+
NondetArrayPrimitive.class
3+
--function NondetArrayPrimitive.intArrayMulti --max-nondet-array-length 51 --unwind 4
4+
^VERIFICATION FAILED$
5+
^EXIT=10$
6+
^SIGNAL=0$
7+
line 23 assertion.*: FAILURE
8+
--
9+
^warning: ignoring
10+
--
11+
Check inner most array of multi-dimensional array is reachable independently of
12+
--unwind value.

0 commit comments

Comments
 (0)