Skip to content

Add cut-point rules for specific functions / intrinsics (via definition))#960

Open
dkcumming wants to merge 17 commits intomasterfrom
dc/filter-function-cut-point-definiton-version
Open

Add cut-point rules for specific functions / intrinsics (via definition))#960
dkcumming wants to merge 17 commits intomasterfrom
dc/filter-function-cut-point-definiton-version

Conversation

@dkcumming
Copy link
Collaborator

@dkcumming dkcumming commented Feb 28, 2026

This PR builds upon #931 modifying the approach in response to the comments on that PR. For full context read #931 first.

The kmir prove-rs flag --break-on-function is implemented in this PR as a compiled definition with hooked function to retrieve the function names to match on. This is similar to the already existing pattern that compiles the static data of a KMIR configuration into the definition. This allows for functions to be provided both when creating the initial proof, and when reading from disc (triggers a recompile of llvm if different flags are provided).

I added a test to demonstrate this working on functions and intrinsics, only matching those provided. I do not have a test from reading a partial proof and adding different function names - I did test it but it seemed a bit overboard for a test just now.

I did try the method with K shell access impure function, however this created branching for every function call since the result was stored in a symbolic value. I couldn't figure out how to get that working concretely (I don't think it is possible but might be wrong).

The `breakOnFunctions` cell will contain identifiers of functions that
should be broken on by the `termCallFunctionFilter` rule. Which is
identical to `termCallFunction` except it checks if the id is in the
`breakOnFunctions` cell and has a different identifier for the cut point
rules.
Fully qualified paths may have commas. Instead of using a separator use
multiple occurances of the flag
2 intrinsics and 2 functions are added, 1 of each is broken on only and
should appear in the output
Since the config does not change now there is no value in changing the
test files as it now only would change the non-deterministic tys
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