generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 134
Closed
Description
Requested feature: Creating a non-deterministic slice (with non-deterministic content as well as a non-deterministic length) currently requires multiple steps. For example, the following code creates a non-deterministic slice of u8 with a maximum length of 10:
let arr: [u8; 10] = rmc::nondet();
let slice_len: usize = rmc::nondet();
rmc::assume(slice_len <= 10);
&arr[..slice_len]It would be useful to wrap this in some API to simplify creating non-deterministic slices.
Use case: To test functions that take a slice.
Link to relevant documentation (Rust reference, Nomicon, RFC):
Is this a breaking change?
Metadata
Metadata
Assignees
Labels
No labels