Skip to content

Commit 557be1d

Browse files
author
thk123
committed
Adding test demonstrating fix to trace generation
1 parent dd7db5a commit 557be1d

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 the trace produced when creating an array whose size is determined
10+
by a an array input, the 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 get the cprover library.

0 commit comments

Comments
 (0)