Skip to content

Challenge 8: Kani contracts for SmallSort - #640

Open
sankalpsthakur wants to merge 4 commits into
model-checking:mainfrom
sankalpsthakur:challenge/08-smallsort
Open

Challenge 8: Kani contracts for SmallSort#640
sankalpsthakur wants to merge 4 commits into
model-checking:mainfrom
sankalpsthakur:challenge/08-smallsort

Conversation

@sankalpsthakur

Copy link
Copy Markdown

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

  • Local worktree on challenge/08-smallsort
  • Kani CI on this PR is the authoritative run (scripts/run-kani.sh)

Fixes #56

AI/LLM disclosure

  • AI coding tools (including Grok and/or Codex agent-assisted editing) were used to help draft or modify code and this PR description.
  • I reviewed the complete change, understand the reasoning, and take responsibility for the contracts and harnesses.
  • This submission is original work of authorship under the project contributor terms; AI output was not pasted unreviewed.

Kani contracts and harnesses for verify-rust-std challenge.

Fixes rust-lang#56
@sankalpsthakur
sankalpsthakur requested a review from a team as a code owner August 20, 2026 12:08
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.
@feliperodri feliperodri added the Challenge Used to tag a challenge label Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Challenge Used to tag a challenge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Challenge 8: Contracts for SmallSort

2 participants