Commit 5f14b73
Carolyn Zech
Improve Help Menu (#4109)
1. Group options by category. We already have structs in the source code
to do this (e.g. `CommonArgs`), so I just followed that structure. The
goal is to make it easier for users to tell what the options do--I don't
think it's currently clear that some of these arguments are for Cargo,
for example. Open to bikeshedding on the section names--I think "Common
Options" is a bit vague but couldn't think of anything better.
2. For each category, put its entries in alphabetical order.
New output from `cargo kani -h` below. Note that
#4110 will hide some of these
options.
```
cmzech@80a9971b5e20 playground % cargo kani -h
Verify a Rust crate. For more information, see https://github.com/model-checking/kani
Usage: cargo-kani [OPTIONS] [COMMAND]
Commands:
autoharness Create and run harnesses automatically for eligible functions. Implies -Z function-contracts and -Z loop-contracts. See https://model-checking.github.io/kani/reference/experimental/autoharness.html for documentation
list List contracts and harnesses
playback Execute concrete playback testcases of a local package
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help (see more with '--help')
-V, --version Print version
Verification Options:
--cbmc-args [<CBMC_ARGS>...]
Pass through directly to CBMC; must be the last flag. This feature is unstable and it requires `-Z unstable-options` to be used
--concrete-playback <CONCRETE_PLAYBACK>
Generate concrete playback unit test. If value supplied is 'print', Kani prints the unit test to stdout. If value supplied is 'inplace', Kani automatically adds the unit test to your source code. This option does not work with `--output-format old` [possible values: print, inplace]
--default-unwind <DEFAULT_UNWIND>
Specify the value used for loop unwinding in CBMC
--exact
When specified, the harness filter will only match the exact fully qualified name of a harness
--fail-fast
Stop the verification process as soon as one of the harnesses fails
--force-build
Force Kani to rebuild all packages before the verification
--harness <HARNESS_FILTER>
If specified, only run harnesses that match this filter. This option can be provided multiple times, which will run all tests matching any of the filters. If used with --exact, the harness filter will only match the exact fully qualified name of a harness
--harness-timeout <HARNESS_TIMEOUT>
Timeout for each harness with optional suffix ('s': seconds, 'm': minutes, 'h': hours). Default is seconds. This option is experimental and requires `-Z unstable-options` to be used
--no-assertion-reach-checks
Turn off assertion reachability checks
--output-format <OUTPUT_FORMAT>
Toggle between different styles of output [default: regular] [possible values: regular, terse, old]
--randomize-layout [<RANDOMIZE_LAYOUT>]
Randomize the layout of structures. This option can help catching code that relies on a specific layout chosen by the compiler that is not guaranteed to be stable in the future. If a value is given, it will be used as the seed for randomization See the `-Z randomize-layout` and `-Z layout-seed` arguments of the rust compiler
--solver <SOLVER>
Specify the CBMC solver to use. Overrides the harness `solver` attribute. If no solver is specified (with --solver or harness attribute), Kani will use CaDiCaL [possible values: cadical, kissat, minisat, bin=<SAT_SOLVER_BINARY>]
--target-dir <TARGET_DIR>
Directory for all generated artifacts
--tests
Enable test function verification. Only use this option when the entry point is a test function
--unwind <UNWIND>
Specify the value used for loop unwinding for the specified harness in CBMC
Memory Checks:
--default-checks Turn on all default checks
--no-default-checks Turn off all default checks
--memory-safety-checks Turn on default memory safety checks
--no-memory-safety-checks Turn off default memory safety checks
--overflow-checks Turn on default overflow checks
--no-overflow-checks Turn off default overflow checks
--undefined-function-checks Turn on undefined function checks
--no-undefined-function-checks Turn off undefined function checks
--unwinding-checks Turn on default unwinding checks
--no-unwinding-checks Turn off default unwinding checks
Common Options:
--debug Produce full debug information
-q, --quiet Produces no output, just an exit code and requested artifacts; overrides --verbose
-v, --verbose Output processing stages and commands, along with minor debug information
-Z, --unstable <UNSTABLE_FEATURE> [possible values: async-lib, autoharness, concrete-playback, c-ffi, float-lib, function-contracts, gen-c, ghost-state, lean, list, loop-contracts, mem-predicates, restrict-vtable, source-coverage, stubbing, uninit-checks, unstable-options, valid-value-checks]
Cargo Common Options:
--all-features Activate all package features
-e, --exclude <EXCLUDE>... Exclude the specified packages
-F, --features <FEATURES> Comma separated list of package features to activate
--manifest-path <PATH> Path to Cargo.toml
--no-default-features Do not activate the `default` feature
-p, --package <PACKAGE>... Run Kani on the specified packages (see `cargo help pkgid` for the accepted format)
--workspace Build all packages in the workspace
Cargo Target Options:
--bin <BIN> Check only the specified binary target
--bins Check all binaries
--lib Check only the package's library unit tests
```
Resolves #1951
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.1 parent 9d31d52 commit 5f14b73
4 files changed
Lines changed: 152 additions & 138 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | | - | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
32 | | - | |
| 34 | + | |
33 | 35 | | |
34 | | - | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
40 | | - | |
41 | | - | |
42 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
98 | 100 | | |
99 | 101 | | |
100 | 102 | | |
| 103 | + | |
101 | 104 | | |
102 | 105 | | |
103 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
144 | 148 | | |
145 | 149 | | |
146 | 150 | | |
147 | 151 | | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
176 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
177 | 178 | | |
178 | 179 | | |
179 | 180 | | |
180 | 181 | | |
181 | | - | |
182 | | - | |
183 | | - | |
| 182 | + | |
| 183 | + | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| 189 | + | |
189 | 190 | | |
190 | 191 | | |
191 | 192 | | |
192 | 193 | | |
193 | 194 | | |
194 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
195 | 211 | | |
196 | 212 | | |
197 | 213 | | |
198 | 214 | | |
199 | 215 | | |
200 | 216 | | |
201 | | - | |
202 | | - | |
| 217 | + | |
| 218 | + | |
203 | 219 | | |
204 | | - | |
| 220 | + | |
205 | 221 | | |
206 | | - | |
207 | | - | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
208 | 234 | | |
209 | | - | |
| 235 | + | |
210 | 236 | | |
211 | | - | |
| 237 | + | |
212 | 238 | | |
213 | | - | |
| 239 | + | |
214 | 240 | | |
215 | 241 | | |
216 | 242 | | |
217 | 243 | | |
218 | 244 | | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
225 | 249 | | |
226 | 250 | | |
227 | 251 | | |
228 | 252 | | |
229 | 253 | | |
230 | 254 | | |
231 | 255 | | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
| 256 | + | |
241 | 257 | | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
| 258 | + | |
246 | 259 | | |
247 | | - | |
248 | | - | |
| 260 | + | |
| 261 | + | |
249 | 262 | | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
| 263 | + | |
271 | 264 | | |
272 | 265 | | |
273 | 266 | | |
| |||
276 | 269 | | |
277 | 270 | | |
278 | 271 | | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
| 272 | + | |
| 273 | + | |
283 | 274 | | |
284 | | - | |
| 275 | + | |
285 | 276 | | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
| 277 | + | |
291 | 278 | | |
292 | | - | |
| 279 | + | |
| 280 | + | |
293 | 281 | | |
294 | 282 | | |
295 | 283 | | |
296 | 284 | | |
297 | | - | |
298 | | - | |
| 285 | + | |
| 286 | + | |
299 | 287 | | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
| 288 | + | |
305 | 289 | | |
306 | | - | |
| 290 | + | |
307 | 291 | | |
308 | | - | |
| 292 | + | |
309 | 293 | | |
310 | 294 | | |
311 | 295 | | |
312 | 296 | | |
313 | 297 | | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
| 298 | + | |
324 | 299 | | |
325 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
326 | 305 | | |
327 | | - | |
| 306 | + | |
328 | 307 | | |
329 | 308 | | |
330 | 309 | | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
331 | 314 | | |
332 | 315 | | |
333 | 316 | | |
334 | 317 | | |
335 | 318 | | |
336 | 319 | | |
337 | 320 | | |
338 | | - | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
339 | 327 | | |
340 | | - | |
| 328 | + | |
341 | 329 | | |
342 | | - | |
343 | | - | |
344 | | - | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
345 | 334 | | |
346 | | - | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
347 | 345 | | |
348 | | - | |
| 346 | + | |
349 | 347 | | |
350 | | - | |
| 348 | + | |
351 | 349 | | |
352 | | - | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
353 | 365 | | |
354 | 366 | | |
355 | 367 | | |
| |||
358 | 370 | | |
359 | 371 | | |
360 | 372 | | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | 373 | | |
365 | 374 | | |
366 | 375 | | |
| |||
421 | 430 | | |
422 | 431 | | |
423 | 432 | | |
| 433 | + | |
424 | 434 | | |
425 | 435 | | |
426 | 436 | | |
| |||
0 commit comments