Support for .rs files in kmir run#1081
Merged
Merged
Conversation
The interface is similar to prove. --save-smir also added.
dkcumming
approved these changes
May 6, 2026
Collaborator
dkcumming
left a comment
There was a problem hiding this comment.
Nice all looks great to me. I tested it and I can't find any flaws!
| case 'run': | ||
| return RunOpts( | ||
| rs_file=ns.rs_file, | ||
| start_symbol=ns.start_symbol, |
Collaborator
There was a problem hiding this comment.
Originally, I was thinking a run would always invoke a Rust program from the default entry point (typically main), but I tested this on sum-to-n-functions.rs and it works with start symbol of either "main" or "test_sum_to_n" which is actually quite nice. I wasn't sure what would happen if it was pointed to "sum_to_n" (since that takes arguments which we would have to somehow instantiate) but it failed with a nice error
ValueError: Cannot create concrete call configuration for sum_to_n: function has parameters
automergerpr-permission-manager Bot
pushed a commit
to runtimeverification/kompass
that referenced
this pull request
May 8, 2026
This updates KMIR to [PR 1081](runtimeverification/mir-semantics#1081) which introduces the ability to `kmir run <RUST_FILE>` instead of needing to manually compile the `.smir.json` first. The required change to `_kompass_run` is propagated. --------- Co-authored-by: devops <devops@runtimeverification.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: dkcumming <daniel.cumming@runtimeverification.com>
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.
This PR changes the interface of
kmir runto matchprove, and adds to it the ability to accept.rsfiles directly.--smir, cargo target if--bin--smirand--binare mutually exclusive--save-smiroption to keep the intermediate SMIR JSON when running from .rsFinally, I renamed the
test_stable_mir_ui_pass.py(which usesprove) totest_stable_mir_ui_prove.py, and provided thetest_stable_mir_ui_exec.pythat usesrun.