Skip to content

Autoharness umbrella: requires bounded arguments (RequiresBoundedArguments) #4890

Open

Description

@CYJ904

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:

  1. &[T] where T implements Arbitrary
  2. &str and &CStr
  3. Types that implement BoundedArbitrary, such as Vec and String
  4. 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:

  1. Const generic parameter Kani can't pick a value for (non-usize, or a const {} block constraint)
  2. Generic function with no candidate type
  3. No function body
  4. Missing Arbitrary
  5. Requires bounded arguments

Because this check runs last, a function reported here has no other known skip reason.

Cases that belong elsewhere

  1. A function that is still skipped after passing --bounded-arguments: go by the new reason's umbrella.
  2. A function with both an unsupported argument and a bounded argument. Kani reports MissingArbitraryImpl for it: Missing Arbitrary umbrella, Autoharness umbrella: Missing Arbitrary (MissingArbitraryImpl) #4887.
  3. &mut str, which is not supported and is reported as MissingArbitraryImpl: 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

  1. added this to the Autoharness milestone on Sep 30, 2026
  2. added
    Z-Autoharness
    on Nov 6, 2026
  3. self-assigned this
    on Nov 6, 2026
  4. changed the issue type fromtoon Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Z-Autoharness

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions