-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Function Contracts: Modify Slices #3289
Conversation
Can the compiler detect the pointer type and do that optimization under the hood? |
} | ||
|
||
#[kani::proof_for_contract(zero)] | ||
fn main() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a meaningful name to the harness instead of main
.
Closing for different implementation that doesn't create a new modifies_slices contract but uses just one modifies contract. It was useful to prototype this implementation to understand how the two differ so that they can be joined together. |
Using the
__CPROVER_object_upto
function to pass modifies clauses to asserts clauses in goto for rust slices.Adds new functionality of a new contract
kani:modifies_slice(slice)
that allows for indicating if a slice is modifiable.Todo:
__CPROVER_object_upto
takes a size parameter in number of bytesResolves #2908
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.