Function Contracts: Modifies for str #3349
Labels
[C] Feature / Enhancement
A new feature request or enhancement to an existing feature.
Z-Contracts
Issue related to code contracts
Milestone
We would like to be able to verify mutable string references in kani contracts. In particular, the following test case should pass:
There seems to be an issue with the current compilation strategy for str within the modifies clause which should be properly investigated (#3295). The current test case (
tests/expected/function-contract/modifies_fat_pointer/string_rewrite_ignore.rs
in the PR) should be changed from being ignored to having a valid output.In addition, we would like to test the
kani::internal::write_any_str
function. We want to create a friendly user experience that tells the user that this functionality doesn't exist due to utf8 verification issues. The test case for this would look like the one above, but additionally uses astub_for_contract
macro to force usage of thekani::internal::write_any_str
function.If possible, we should add utf8 verification to allow for the
kani::internal::write_any_str
function to work properly. The concerns are not of whether this is possible, but whether this is fast enough to reasonably verify in cbmc.The text was updated successfully, but these errors were encountered: