Failed check: memmove.assigns in Memory operations API #142
-
I ran into a failed check for both copy_to and copy_from API. Can a clause be added to the contract to make it successful? The exact error message is: This is the contract I wrote for copy_to:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I have the same error for
|
Beta Was this translation helpful? Give feedback.
-
Hi @Dhvani-Kapadia, @danielhumanmod. Both functions modify the object, so a modifies-clause is needed. See https://model-checking.github.io/kani/crates/doc/kani/contracts/index.html#write-sets for details. You can also look at some examples in https://github.com/model-checking/kani/tree/main/tests/expected/function-contract/modifies. |
Beta Was this translation helpful? Give feedback.
Hi @Dhvani-Kapadia, @danielhumanmod. Both functions modify the object, so a modifies-clause is needed. See https://model-checking.github.io/kani/crates/doc/kani/contracts/index.html#write-sets for details. You can also look at some examples in https://github.com/model-checking/kani/tree/main/tests/expected/function-contract/modifies.