Skip to content

Commit 08c7c9d

Browse files
thk123tautschnig
thk123
authored andcommitted
Adding test demonstrating fix to trace generation
1 parent d2ca288 commit 08c7c9d

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed
Binary file not shown.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import org.cprover.CProver;
2+
3+
public class TestClass {
4+
5+
public static void minimalJbmc(Object[] a) {
6+
CProver.assume(a != null && a.length > 1);
7+
float[] assigned = new float[a.length];
8+
assigned[0] = 1.0f;
9+
assert(false);
10+
}
11+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
CORE
2+
TestClass.class
3+
--function "TestClass.minimalJbmc" --unwind 5 --max-nondet-string-length 10 --java-unwind-enum-static --trace --json-ui
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
VERIFICATION FAILED
7+
--
8+
--
9+
Verify that when an array's size is determined by an array input, the resulting
10+
trace is valid.
11+
To compile this source file, use:
12+
13+
```bash
14+
$ javac -g TestClass.java -cp ../../../lib/java-models-library/target/classes/:.
15+
```
16+
to have the cprover library on the class path.

0 commit comments

Comments
 (0)