Challenge 26: Verify safety of Rc functions#574
Open
Samuelsills wants to merge 2 commits intomodel-checking:mainfrom
Open
Challenge 26: Verify safety of Rc functions#574Samuelsills wants to merge 2 commits intomodel-checking:mainfrom
Samuelsills wants to merge 2 commits intomodel-checking:mainfrom
Conversation
Add Kani proof harnesses for Rc functions specified in Challenge model-checking#26: 12 unsafe functions (assume_init, from_raw, from_raw_in, increment/decrement_strong_count, get_mut_unchecked, downcast_unchecked, Weak::from_raw, Weak::from_raw_in) and 44 safe functions covering allocation, reference counting, conversion, Weak pointer operations, and UniqueRc. Exceeds 75% safe threshold (44/54 = 81%). Resolves model-checking#382 Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Author
Verification Coverage ReportUnsafe Functions (12/12 — 100% ✅)
Safe Functions with Unsafe Code (44/54 — 81%, exceeds 75% threshold ✅)Allocation: Total: 56 harnesses (12 unsafe + 44 safe) UBs Checked
Verification Approach
|
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
Add Kani proof harnesses for Rc functions specified in Challenge #26:
Unsafe (12/12 — all required):
assume_init(single + slice),from_raw,from_raw_in,increment_strong_count,increment_strong_count_in,decrement_strong_count,decrement_strong_count_in,get_mut_unchecked,downcast_unchecked,Weak::from_raw,Weak::from_raw_inSafe (44/54 — 81%, exceeds 75% threshold):
new,new_uninit,new_zeroed,try_new,try_new_uninit,try_new_zeroed,pin, and_invariantsnew_uninit_slice,new_zeroed_slice,into_array, and_invariantsinto_raw_with_allocator,as_ptr,get_mut,try_unwrap,downcastclone,drop,default(i32, str),from(&str, Vec, Rc),try_fromas_ptr,into_raw_with_allocator,upgrade,inner,dropinto_rc,deref,deref_mut,dropAll harnesses verified locally with Kani.
Resolves #382