-
Notifications
You must be signed in to change notification settings - Fork 126
Autoharness: Update Filtering Options #4025
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autoharness: Update Filtering Options #4025
Conversation
#4024 includes the changes required to include the crate name as part of |
Leaving this PR in draft until I add a test for using |
…dence Also rename them to reference patterns to make it clearer how one might use them together.
d62a6b9
to
58ad115
Compare
58ad115
to
3a758ab
Compare
Summary
kani_compiler_flags
, which ensures they're passed to all Kani compiler invocations.--include-function
and--exclude-function
to mentionpattern
s instead, which makes it clearer that they talk about substrings of the total paths (e.g., modules). Also implement the suggestion from Autoharness Misc. Improvements #3922 (comment) so that the flags are no longer mutually exclusive.Detail
Some more context on why f933799c54b09210cb267963ff1dc431c7a9385a allows for both flags to be passed now: I realized as part of #3984 how when we call
cargo rustc
for acargo kani
invocation, we don't pass--reachability
to dependencies to avoid running harnesses in them. The problem is that we can't do the same for our cargo command to build the standard library, since that usescargo build
, which does not have the same ability to pass flags only to the final compiler invocation and not the dependencies. So we end up passing--reachability=AllFns
to the dependencies of the standard library as well and generate automatic harnesses for them. If we can pass both filter flags, we can run commands likekani autoharness --std --include-pattern core --exclude-pattern miniz_oxide
, which will include functions from thecore
crate while excluding functions in theminiz_oxide
that just happen to have the word "core" in them.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.