Challenge 29: Verify safety of Box functions#573
Open
Samuelsills wants to merge 2 commits intomodel-checking:mainfrom
Open
Challenge 29: Verify safety of Box functions#573Samuelsills wants to merge 2 commits intomodel-checking:mainfrom
Samuelsills wants to merge 2 commits intomodel-checking:mainfrom
Conversation
Add Kani proof harnesses for Box functions specified in Challenge model-checking#29: 9 unsafe functions (assume_init, from_raw, from_non_null, from_raw_in, from_non_null_in, downcast_unchecked x3) and 34 safe functions covering allocation, conversion, cloning, downcasting, and trait implementations. Exceeds the 75% safe function threshold (34/43 = 79%). Resolves model-checking#526 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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 Box functions specified in Challenge #29:
Unsafe (9/9 — all required):
assume_init(single + slice),from_raw,from_non_null,from_raw_in,from_non_null_in,downcast_unchecked(Any, Any+Send, Any+Send+Sync)Safe (34/43 — 79%, exceeds 75% threshold):
new_in,try_new_in,try_new_uninit_in,try_new_zeroed_innew_uninit_slice,new_zeroed_slice,try_new_uninit_slice,try_new_zeroed_slice,into_arrayinto_boxed_slice,write,into_non_null,into_raw_with_allocator,into_non_null_with_allocator,into_unique,leak,into_pindrop,default(i32, str),clone(T, str),from_slice,from(&str),from(Box->Box<[u8]>),try_from(slice->array)downcast(Any x3, Error x3)All harnesses verified locally with Kani.
Resolves #526