Repository navigation
Description
This umbrella tracks functions that autoharness skips by default because an argument can only be generated with a size bound. It is one of five skip-reason umbrellas indexed in #4879.
What this category means
Some argument types have no unbounded Arbitrary implementation, but can be generated up to a bounded size through BoundedArbitrary. By default autoharness skips these functions with the reason RequiresBoundedArguments. Passing --bounded-arguments makes Kani generate harnesses for them.
Argument types that put a function in this category include:
&[T]whereTimplementsArbitrary&strand&CStr- Types that implement
BoundedArbitrary, such asVecandString - Raw pointers to any of the above
On current main, when alloc is available, &[T], &mut [T], and Vec<T> with integer or float elements are generated without bounds and are no longer in this category.
Classification rule
We classify by the skip reason Kani reports, not by the underlying cause. Kani reports only one reason per function: the first check that fails, in this order:
- Const generic parameter Kani can't pick a value for (non-usize, or a
const {}block constraint) - Generic function with no candidate type
- No function body
- Missing
Arbitrary - Requires bounded arguments
Because this check runs last, a function reported here has no other known skip reason.
Cases that belong elsewhere
- A function that is still skipped after passing
--bounded-arguments: go by the new reason's umbrella. - A function with both an unsupported argument and a bounded argument. Kani reports
MissingArbitraryImplfor it: Missing Arbitrary umbrella, Autoharness umbrella: Missing Arbitrary (MissingArbitraryImpl) #4887. &mut str, which is not supported and is reported asMissingArbitraryImpl: Missing Arbitrary umbrella, Autoharness umbrella: Missing Arbitrary (MissingArbitraryImpl) #4887.
All umbrellas are listed in #4879.
How to check
Run autoharness on your crate (cargo kani autoharness -Z autoharness), or in verify-rust-std run kani autoharness -Z autoharness --std ./library with the flags your setup uses. Kani prints a table of skipped functions with their reasons before the list of harnesses. Don't pass --quiet, which suppresses that table. Then run again with --bounded-arguments and check that the function is generated.
How to link
Add Part of #<this issue> to your issue or PR description so it shows up here. Typical items are bounded models for additional types, or problems with harnesses generated under --bounded-arguments.
Activity