@@ -22,9 +22,9 @@ features of JBMC, and explore the most useful features.
22
22
23
23
\subsection jbmc-manual-auto-assert Automatic assertions
24
24
25
- Consider the following simplistic ` ExampleArray.java ` file which we have compiled
26
- into ` ExampleArray.class ` and which contains a utility method to query a given
27
- array at a given index:
25
+ Consider the following simplistic ` ExampleArray.java ` file which we have
26
+ compiled into ` tutorial/ ExampleArray.class` and which contains a utility method
27
+ to query a given array at a given index:
28
28
```
29
29
1| package tutorial;
30
30
2|
@@ -39,7 +39,7 @@ array at a given index:
39
39
Now let's run the following command to let JBMC tell us about potential errors
40
40
in our ` query ` method.
41
41
42
- $ jbmc ExampleArray.class --function tutorial.ExampleArray.query
42
+ $ jbmc tutorial/ ExampleArray.class --function tutorial.ExampleArray.query
43
43
44
44
45
45
The output contains the following:
@@ -116,7 +116,7 @@ depends on an input):
116
116
To limit the number of times the for-loop is unwound, we use the ` --unwind N `
117
117
options, in which case the following call to JBMC:
118
118
119
- $ jbmc ExampleUnwind.class --function tutorial.ExampleUnwind.isPrime --unwind 10
119
+ $ jbmc tutorial/ ExampleUnwind.class --function tutorial.ExampleUnwind.isPrime --unwind 10
120
120
121
121
will terminate correctly. In this case, we will see ` VERIFICATION SUCCESSFUL ` ,
122
122
as no automatic assertions are violated.
@@ -129,7 +129,7 @@ JBMC will try do refute. On line 7, we check the assertion that all odd
129
129
numbers greater than 1 are prime. To be sure that this always holds, we run
130
130
JBMC on the example, with a reasonable ` unwind ` value:
131
131
132
- $ jbmc ExampleUnwind.class --function tutorial.ExampleUnwind.doSomething --unwind 10
132
+ $ jbmc tutorial/ ExampleUnwind.class --function tutorial.ExampleUnwind.doSomething --unwind 10
133
133
134
134
Unsurprisingly JBMC doesn't agree, and prints an assertion failure
135
135
(truncated here for readability):
@@ -178,7 +178,7 @@ from `java.lang.String`, e.g.
178
178
The following command line (note that the current directory is also added to
179
179
the classpath):
180
180
181
- $ jbmc ExampleModels.class --cp <path_to_cbmc>/jbmc/src/java_bytecode/library/core-models.jar:.
181
+ $ jbmc tutorial/ ExampleModels.class --cp <path_to_cbmc>/jbmc/src/java_bytecode/library/core-models.jar:.
182
182
183
183
will flag this violation (truncated):
184
184
``` c
0 commit comments