Repository navigation
Description
This umbrella tracks autoharness functions that are skipped because at least one argument type has no Arbitrary implementation. It is one of five skip-reason umbrellas indexed in #4879.
What this category means
Autoharness builds a harness by creating a nondeterministic value for every argument with kani::any(), which requires the argument type to implement Arbitrary. If an argument type has no Arbitrary implementation visible in the current flow, the function is skipped with the reason MissingArbitraryImpl, and the message names the argument(s) and their type(s).
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
If Kani reports MissingArbitraryImpl, the function belongs here.
Common cases that belong here
- References to core types that need a bounded model, similar to the existing
&strsupport. Examples:&ByteStr,&Wtf8. - Core structs or enums with private fields and no
Arbitraryimplementation. Example: thecore::str::patternsearcher types. allocorstdtypes in the--stdflow. That flow only linkskani_core, so an implementation inlibrary/kaniis not visible there. Examples:Vec,String,Box.- Generic functions that were instantiated successfully, but whose instantiated argument types lack
Arbitrary. These are reported under the instantiated name, such asfoo::<i32>, and belong here rather than in a generics umbrella. - Functions with both an unsupported argument and an argument that would need
--bounded-arguments. Kani reportsMissingArbitraryImpland lists only the unsupported argument; passing--bounded-argumentsdoes not help. - Types where an implementation may not be meaningful, such as OS handles,
&mut Formatter, trait objects, or!. These still belong here, and the issue can record why no implementation is planned.
Cases that belong elsewhere
- A generic function for which Kani finds no concrete type: Autoharness umbrella: generic function with no candidate type (GenericFn) #4888.
- A const generic parameter Kani can't pick a value for: Autoharness umbrella: non-usize const generic parameters (GenericFn) #4889.
- A function that is only skipped without
--bounded-arguments: Autoharness umbrella: requires bounded arguments (RequiresBoundedArguments) #4890. - A function with no body, such as an intrinsic: Autoharness umbrella: no function body (NoBody) #4891.
- A harness that is generated but crashes, fails, or verifies the wrong thing. This is not a skip; see Autoharness: umbrella issue classifying open issues by skip reason #4879.
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.
How to link
Add Part of #<this issue> to your issue or PR description so it shows up here. One issue per type, or per closely related family of types, is easiest to track (for example, #4811 covers three searcher types together).
Activity