Skip to content

Commit 1ba2280

Browse files
Update JBMC user manual
JBMC now accepts class name as direct argument now.
1 parent b355f7f commit 1ba2280

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

doc/cprover-manual/jbmc-user-manual.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ input arguments at index 3:
4141
Now let's run the following command to let JBMC tell us about potential errors
4242
in our program.
4343
```
44-
$ jbmc tutorial/ExampleArray.class
44+
$ jbmc tutorial.ExampleArray
4545
```
4646

4747
The output contains the following:
@@ -77,7 +77,7 @@ safe as follows:
7777
```
7878
then when running JBMC on that corrected version:
7979
```
80-
$ jbmc tutorial/ExampleArraySafe.class
80+
$ jbmc tutorial.ExampleArraySafe
8181
```
8282

8383
all the automatic assertions become valid, meaning that there is no
@@ -123,7 +123,7 @@ depends on an input):
123123
To limit the number of times the for-loop is unwound, we use the `--unwind N`
124124
options, in which case the following call to JBMC:
125125
```
126-
$ jbmc tutorial/ExampleUnwind.class --function tutorial.ExampleUnwind.isPrime --unwind 10
126+
$ jbmc tutorial.ExampleUnwind --function tutorial.ExampleUnwind.isPrime --unwind 10
127127
```
128128
will terminate correctly. In this case, we will see `VERIFICATION SUCCESSFUL`,
129129
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
139139
numbers greater than 1 are prime. To be sure that this always holds, we run
140140
JBMC on the example, with a reasonable `unwind` value:
141141
```
142-
$ jbmc tutorial/ExampleUnwind.class --function tutorial.ExampleUnwind.doSomething --unwind 10
142+
$ jbmc tutorial.ExampleUnwind --function tutorial.ExampleUnwind.doSomething --unwind 10
143143
```
144144
Unsurprisingly JBMC doesn't agree, and prints an assertion failure
145145
(truncated here for readability):
@@ -188,7 +188,7 @@ from `java.lang.String`, e.g.
188188
The following command line (note that the current directory is also added to
189189
the classpath):
190190
```
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:.
192192
```
193193
will flag this violation (truncated):
194194
```plaintext
@@ -223,7 +223,7 @@ Consider the following code:
223223

224224
When given the `--throw-runtime-exceptions` options:
225225
```
226-
$ jbmc tutorial/ExampleExceptions --tutorial.ExampleExceptions.strLength --throw-runtime-exceptions
226+
$ jbmc tutorial.ExampleExceptions --tutorial.ExampleExceptions.strLength --throw-runtime-exceptions
227227
```
228228
JBMC will signal that the `str.length()` call may throw a runtime exception
229229
and that this exception is not caught.
@@ -245,7 +245,7 @@ VERIFICATION SUCCESSFUL
245245

246246
When analyzing this function without runtime exception support:
247247
```
248-
$ jbmc tutorial/ExampleExceptions
248+
$ jbmc tutorial.ExampleExceptions
249249
```
250250
JBMC only reports the error as a null pointer check failure:
251251
```

0 commit comments

Comments
 (0)