Skip to content

Conversation

rv-jenkins and others added 4 commits October 30, 2025 13:11
Co-authored-by: devops <devops@runtimeverification.com>
This PR adds:
- The option `--break-on-calls` to `kmir prove` which will break the
proof at the rule `#setUpCalleeData` for easy linking of proof to source
code
- The command `kmir section-edge` which can be provided an existing
proof and an edge (two linked nodes in the kcfg) as a tuple (e.g. `4,5`)
and will proof an amount of nodes breaking the edge up. In particular I
find this may be useful if we can identify when a thunk is written to
`<locals>` and we can section out the edge between the node it appears
and the call above it. If the distance between the nodes is `n` steps,
then the max sections is `n - 1` which will take 1 step.

### Current Problems
- `--break-on-calls` is outputing the node at `#setUpCalleeData` but is
also outputting the node afterwards `#setArgsFromStack` which is
doubling the amount of output - I did look but can't understand why this
is happening currently, however it is also not a deal breaker for me
right now - I am still able to see the nodes I want and just some extra.
UPDATE: This behaviour is also the same with Kontrol so I think this is
a broader thing with K pr pyk

---------

Co-authored-by: Jost Berthold <jost.berthold@gmail.com>
Closes #789 

In particular adds:
- [x] `--break-on-instrinsic-calls` breaks on calling `Intrinsic`s
- [x] `--break-on-function-calls` breaks on calling `Function`s
- [x] `--break-on-thunks` breaks on `thunk`
- [x] `--break-every-statement` breaks every MIR `Statement`
- [x] `--break-every-terminator` breaks every MIR `Terminator`
- [x] `--break-on-terminator-goto` breaks on calling
`TerminatorKind::Goto`
- [x] `--break-on-terminator-switch-int` breaks on calling
`TerminatorKind::SwitchInt`
- [x] `--break-on-terminator-return` breaks on calling
`TerminatorKind::Return`
- [x] `--break-on-terminator-call` breaks on calling
`TerminatorKind::Call`
- [x] `--break-on-terminator-assert` breaks on calling
`TerminatorKind::Assert`
- [x] `--break-on-terminator-drop` breaks on calling
`TerminatorKind::Drop`
- [x] `--break-on-terminator-unreachable` breaks on calling
`TerminatorKind::Unreachable`
- [x] `--break-every-step` breaks every MIR `Statement` and `Terminator`

And `--break-on-calls` now breaks on instrinics and function calls at
the `Terminator` call since it dumps `#setUpCalleeData` node after you
can see the name of the intrinsic or function still
@dkcumming dkcumming merged commit fa28e3f into feature/p-token Oct 31, 2025
8 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.

5 participants