Add cut-point rules for specific functions / intrinsics (via definition))#960
Open
Add cut-point rules for specific functions / intrinsics (via definition))#960
Conversation
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
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 builds upon #931 modifying the approach in response to the comments on that PR. For full context read #931 first.
The
kmir prove-rsflag--break-on-functionis 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).