Challenge 8: Kani contracts for SmallSort - #640
Open
sankalpsthakur wants to merge 4 commits into
Open
Conversation
Kani contracts and harnesses for verify-rust-std challenge. Fixes rust-lang#56
Apply rustfmt from ./scripts/check_rustc.sh --bless.
Drop len=9..32 full-unroll proofs, permutation checks, and the insertion_sort loop invariant that made loop-contract checking diverge. Listed functions keep safety and sortedness contracts, verified at length 4.
Match rust-lang rustfmt.toml (style_edition 2024, use_small_heuristics=Max) so the ubuntu upstream_test format check passes.
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
Kani safety contracts and proof harnesses for this challenge. Runtime stdlib logic is unchanged; annotations are cfg(kani) / contract attributes.
Contracts on smallsort internals used by slice sort.
Validation
challenge/08-smallsortscripts/run-kani.sh)Fixes #56
AI/LLM disclosure