Skip to content

Add kmir tool description and CI workflow - #310

Merged
feliperodri merged 62 commits into
model-checking:mainfrom
runtimeverification:add-kmir-tool
Aug 21, 2026
Merged

Add kmir tool description and CI workflow#310
feliperodri merged 62 commits into
model-checking:mainfrom
runtimeverification:add-kmir-tool

Conversation

@jberthold

Copy link
Copy Markdown

This PR adds the kmir tool to the doc.s and sets up a CI workflow that runs the tool on a few examples.
The examples are drawn from Challenge 11 (unchecked arithmetic operations).

The tool is described using the text from the related issue #296 , and the example proofs come with a description that explains how they were set up.

The kmir tool is work in progress, we expect tool usage to change. Specifically the proof setup will be automated in a future version, enabling the tool to work directly with Rust code.

kmir is provided as a docker image from Dockerhub for the CI workflow. This image also includes stable-mir-json and was assembled for general usage by developers to try the tool in its current state.

Resolves #296

@jberthold
jberthold marked this pull request as ready for review April 2, 2025 11:57
@jberthold
jberthold requested a review from a team as a code owner April 2, 2025 11:57
FWBlueWizard and others added 4 commits April 2, 2025 15:12
- Focused on fixing read/write permission issues in previous image
- New image introduces new env and bash profile for additional exec calls used in CI.
- Still requires some additional steps to fetch the results from the running container but this is a starting point.
Comment thread doc/src/tools/kmir.md Outdated
Comment thread doc/src/tools/kmir.md Outdated
Comment thread doc/src/tools/kmir.md Outdated
Comment thread doc/src/tools/kmir.md Outdated
Comment thread doc/src/tools/kmir.md Outdated
Comment thread doc/src/tools/kmir.md Outdated
Comment thread doc/src/tools/kmir.md Outdated
Comment thread .github/workflows/kmir.yml Outdated
@jberthold

Copy link
Copy Markdown
Author

@tautschnig Thank you very much for your detailed feedback on the text. Will try to address your points in a revised version coming soon.

  1. Meta-note: very long lines make it quite hard to given focussed feedback. Mind breaking lines at 80, 10, or maybe 120 characters?

Very true, sorry for this. Keeping each paragraph in a single line is sometimes necessary for weak renderers but certainly not a good idea for a PR to be commented on.

In a first commit from here, I will just reformat all Markdown to 80-column paragraphs (w/o any non-formatting changes) to get this problem out of the way.

2 should be fine for a public github runner. I attempted to interleave
the proofs that are different so that the expensive `llvm-kompile` calls
will happen at different times.
@dkcumming

Copy link
Copy Markdown

Hey @tautschnig, it would be good to get some feedback on this. CI is passing.

@dkcumming

Copy link
Copy Markdown

@feliperodri hope it is okay to ping unannounced, I wonder if you might be a better candidate to get feedback from

@feliperodri

Copy link
Copy Markdown
Member

@dkcumming this PR is marked as draft, that's why I didn't review it before. Is it ready for a review? I saw in the GitHub issue associated with this application that the tool application already received the go ahead. Turn this into non-draft if it's ready for a full review.

@feliperodri feliperodri self-assigned this Aug 17, 2026
@feliperodri

Copy link
Copy Markdown
Member

@dkcumming also resolve any comment that you already addressed. This will facilitate the review and I won't need to double check work that has been already done.

@dkcumming

Copy link
Copy Markdown

@feliperodri okay sorry I think I got the process misunderstood I will do those things and am in the process of correcting the other PRs you reviewed on Sunday. I intend to correct these things earnestly over the next couple of days. Thank you!

@dkcumming

Copy link
Copy Markdown

@feliperodri I think I need write access to model-checking/verify-rust-std in order to resolve comments and mark this as ready for review. I added links on all comments to the relevant commits, and if I could resolve them I would. What should be do, is there some step I am missing to have that ability or is someone with write access able to do that for me? The original PR was opened by my colleague who is no longer working at RV, maybe that is related.

@feliperodri
feliperodri marked this pull request as ready for review August 18, 2026 14:36

@feliperodri feliperodri left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the full PR (doc page, workflow, and the Challenge 11 harnesses). This is a clean, additive tool onboarding — no changes to library/ and nothing that touches Kani or any existing tool/CI — and both KMIR jobs are green on the current head, so the Docker-based workflow is demonstrably functional. Approving.

The positive harnesses correctly guard each unchecked_* op behind the matching checked_* precondition, and the negative harnesses (with run-proofs.sh --negative inverting the exit code) are the right shape for asserting UB is detected. LGTM.

A few non-blocking follow-ups:

  1. Pin the Docker image tag. kmir.yml uses runtimeverificationinc/kmir:ubuntu-jammy-latest, but the docs recommend pinning to a specific version (e.g. ubuntu-jammy-0.4.206). An unpinned latest can silently change and break CI later without a corresponding commit — pinning it keeps the workflow reproducible.

  2. Tighten the push: trigger. The push trigger has no branch filter and includes library/** in its paths, so KMIR CI fires on any push touching std (which the KMIR proofs never read) and duplicates the pull_request run. Consider dropping library/** from the push paths and/or restricting to main.

  3. Doc polish. A few phrasings read a bit stronger than the current tool maturity ("provably complete", "sound assurances"), and there are minor trailing-whitespace / trailing-blank-line nits (e.g. the extra blank lines appended to doc/src/tools.md). Worth a light editorial pass together with the wording comments already raised in-thread, but not a merge blocker.

@feliperodri

Copy link
Copy Markdown
Member

@feliperodri I think I need write access to model-checking/verify-rust-std in order to resolve comments and mark this as ready for review. I added links on all comments to the relevant commits, and if I could resolve them I would. What should be do, is there some step I am missing to have that ability or is someone with write access able to do that for me? The original PR was opened by my colleague who is no longer working at RV, maybe that is related.

I think the problem is because your colleague opened the PR (sorry for taking so long to review it). It looks good to me and I'll get another committee member to give another review and we should be good to go. You can address all remaining comments/suggestions on follow up PRs and you can track these improvements creating GitHub issues. Thanks for this contribution!

@dkcumming

Copy link
Copy Markdown

@feliperodri I am happy to address those comments immediately. But if that would interfere with the second review I can hold off. Let me know what you prefer.

@feliperodri

Copy link
Copy Markdown
Member

@dkcumming that would not interfere with the second review. You can go ahead and implement the comments.

@dkcumming

Copy link
Copy Markdown

@feliperodri I implemented the changes you requested! Thank you for your review.

@feliperodri

Copy link
Copy Markdown
Member

@feliperodri I implemented the changes you requested! Thank you for your review.

Thank you, @dkcumming! @HuStmpHrrr this is ready for a final review.

@feliperodri
feliperodri enabled auto-merge August 20, 2026 17:02
Comment thread kmir-proofs/0011-floats-ints/carrying_mul.rs
@feliperodri
feliperodri added this pull request to the merge queue Aug 20, 2026
Merged via the queue into model-checking:main with commit e976b65 Aug 21, 2026
30 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tool Application Used to tag tool application

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Tool: KMIR by Runtime Verification

10 participants