Skip to content

Challenge 22: Kani contracts for str iterators - #646

Open
sankalpsthakur wants to merge 4 commits into
model-checking:mainfrom
sankalpsthakur:challenge/22-str-iter
Open

Challenge 22: Kani contracts for str iterators#646
sankalpsthakur wants to merge 4 commits into
model-checking:mainfrom
sankalpsthakur:challenge/22-str-iter

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.

str iterator UTF-8 boundary safety.

Validation

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

Fixes #279

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#279
@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.
Restore original Chars::advance_by loops and cap haystacks at 5 bytes
so autoharness stays inside the 10m timeout. Keep safety contracts and
proof_for_contract harnesses for the challenge functions.

Fixes rust-lang#279
Match check_rustc rustfmt (compact struct literals).
@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 22: Verify the safety of str iter functions

2 participants