@@ -41,7 +41,7 @@ input arguments at index 3:
41
41
Now let's run the following command to let JBMC tell us about potential errors
42
42
in our program.
43
43
```
44
- $ jbmc tutorial/ExampleArray.class
44
+ $ jbmc tutorial.ExampleArray
45
45
```
46
46
47
47
The output contains the following:
@@ -77,7 +77,7 @@ safe as follows:
77
77
```
78
78
then when running JBMC on that corrected version:
79
79
```
80
- $ jbmc tutorial/ExampleArraySafe.class
80
+ $ jbmc tutorial.ExampleArraySafe
81
81
```
82
82
83
83
all the automatic assertions become valid, meaning that there is no
@@ -123,7 +123,7 @@ depends on an input):
123
123
To limit the number of times the for-loop is unwound, we use the ` --unwind N `
124
124
options, in which case the following call to JBMC:
125
125
```
126
- $ jbmc tutorial/ExampleUnwind.class --function tutorial.ExampleUnwind.isPrime --unwind 10
126
+ $ jbmc tutorial.ExampleUnwind --function tutorial.ExampleUnwind.isPrime --unwind 10
127
127
```
128
128
will terminate correctly. In this case, we will see ` VERIFICATION SUCCESSFUL ` ,
129
129
as no automatic assertions are violated.
@@ -139,7 +139,7 @@ JBMC will try to refute. On line 7, we check the assertion that all odd
139
139
numbers greater than 1 are prime. To be sure that this always holds, we run
140
140
JBMC on the example, with a reasonable ` unwind ` value:
141
141
```
142
- $ jbmc tutorial/ExampleUnwind.class --function tutorial.ExampleUnwind.doSomething --unwind 10
142
+ $ jbmc tutorial.ExampleUnwind --function tutorial.ExampleUnwind.doSomething --unwind 10
143
143
```
144
144
Unsurprisingly JBMC doesn't agree, and prints an assertion failure
145
145
(truncated here for readability):
@@ -188,7 +188,7 @@ from `java.lang.String`, e.g.
188
188
The following command line (note that the current directory is also added to
189
189
the classpath):
190
190
```
191
- $ jbmc tutorial/ExampleModels.class --cp <path_to_cbmc>/jbmc/src/java_bytecode/library/core-models.jar:.
191
+ $ jbmc tutorial.ExampleModels --cp <path_to_cbmc>/jbmc/src/java_bytecode/library/core-models.jar:.
192
192
```
193
193
will flag this violation (truncated):
194
194
``` plaintext
@@ -223,7 +223,7 @@ Consider the following code:
223
223
224
224
When given the ` --throw-runtime-exceptions ` options:
225
225
```
226
- $ jbmc tutorial/ ExampleExceptions --tutorial.ExampleExceptions.strLength --throw-runtime-exceptions
226
+ $ jbmc tutorial. ExampleExceptions --tutorial.ExampleExceptions.strLength --throw-runtime-exceptions
227
227
```
228
228
JBMC will signal that the ` str.length() ` call may throw a runtime exception
229
229
and that this exception is not caught.
@@ -245,7 +245,7 @@ VERIFICATION SUCCESSFUL
245
245
246
246
When analyzing this function without runtime exception support:
247
247
```
248
- $ jbmc tutorial/ ExampleExceptions
248
+ $ jbmc tutorial. ExampleExceptions
249
249
```
250
250
JBMC only reports the error as a null pointer check failure:
251
251
```
0 commit comments