Challenge 13: Verify safety of CStr#566
Open
Samuelsills wants to merge 1 commit intomodel-checking:mainfrom
Open
Challenge 13: Verify safety of CStr#566Samuelsills wants to merge 1 commit intomodel-checking:mainfrom
Samuelsills wants to merge 1 commit intomodel-checking:mainfrom
Conversation
bc1216d to
0446b60
Compare
Verify all 14 items listed in the challenge specification. 14 Kani proof harnesses, 0 failures. Bounded verification with MAX_SIZE=32. Part 4 additions: check_index_range_from and check_clone_to_uninit. Resolves model-checking#150 By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.
0446b60 to
a6e0a27
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verify all 14 items listed in Challenge 13. 14 Kani proof harnesses, 0 failures. Bounded verification with MAX_SIZE=32 as permitted by challenge assumptions.
Part 1: Invariant trait for CStr (pre-existing).
Part 2: Harnesses for all 9 safe methods (pre-existing).
Part 3: Contracts and harnesses for all 3 unsafe functions (pre-existing).
Part 4: New harnesses for trait implementations:
check_index_range_from: verifiesIndex<RangeFrom<usize>>preserves the CStr invariant when slicing from any valid start index.check_clone_to_uninit: verifiesCloneToUninitcopies correct bytes to the destination with no undefined behavior. Note: a formal#[requires]contract could not be added because the safety crate's proc macro does not currently support methods insideunsafe impl Traitblocks. Safety is verified via CBMC's built-in memory model checks.Resolves #150
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.