Skip to content

Call the Kani harnesses model checks, not proofs - #170

Merged
mikemaccana merged 1 commit into
mainfrom
claude/kani-model-check-docs
Sep 30, 2026
Merged

mikemaccana merged 1 commit into
mainfrom
claude/kani-model-check-docs

Conversation

@mikemaccana

Copy link
Copy Markdown
Collaborator

Kani is a model checker. Each harness tries every value of the inputs it declares and reports either that every assertion held or the input that breaks one. The docs called these "formal-verification harnesses" that "prove the mathematical correctness" of each program. A formal proof is something else: a mathematical argument written in a proof assistant such as Lean. This repository has none. The companion book now draws that distinction (quicknode/solana-book#190), and these docs now match it.

What changed

  • Wording: every finance/*/kani-proofs/README.md and src/lib.rs module doc, the program READMEs that mention the harnesses, the top-level README.md, the crate descriptions in Cargo.toml and the comments in .github/workflows/kani.yml now say "model check", "Kani harness" and "checks".
  • The naming: each first mention says once that Kani marks a harness with #[kani::proof], which is why the crate is kani-proofs and the harnesses are named proof_*.
  • "money math" is now "arithmetic" throughout.
  • Lending Kani README: it listed proof_interest_index_monotonic, which doesn't exist. The harness is proof_accumulation_factor_monotonic.
  • Token-swap comment: it said proof_swap_preserves_constant_product caps each quantity at 1023. The code caps at 63.

What did not change

No code, identifiers, #[kani::proof] attributes, proof_* names, crate or directory names, commands, or workflow job names. The kani.yml job names Kani proofs (...) and Proof unit tests (...) stay in case branch protection references them by name. Every .rs, .toml and .yml change is to comment text or a TOML description string. cargo fmt --check passes in every kani-proofs crate.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JGEoAUjMm7Evv69k46eNcn


Generated by Claude Code

Kani is a model checker: a harness tries every value of its declared
inputs and reports that every assertion held or the input that breaks
one. The docs called them formal-verification proofs. Every kani-proofs
README, module doc, the program READMEs that mention them, the top-level
README and the kani.yml comments now say model check, and each first
mention explains that the kani-proofs and proof_* names come from Kani's
#[kani::proof] attribute. No code, identifier or job name changed.

Also:
- "money math" becomes "arithmetic" throughout.
- The lending Kani README named proof_interest_index_monotonic, which
  does not exist; the harness is proof_accumulation_factor_monotonic.
- A token-swap comment said the harness caps each quantity at 1023; the
  code caps at 63.

Claude-Session: https://claude.ai/code/session_01JGEoAUjMm7Evv69k46eNcn
@mikemaccana
mikemaccana merged commit d038c9a into main Sep 30, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant