-
Notifications
You must be signed in to change notification settings - Fork 97
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
List Subcommand (Implementation) #3523
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer if the compiler is not aware that this is a list command.
What is |
@celinval Number of contracts is the number of contracts applied to the function. See the PR description for the explanation for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this!! Per our offline discussion, I think we should remove the # of Contracts
. As a bonus it should simplify the compiler changes.
@celinval Thanks for the feedback -- I removed contracts count and simplified the RFC. Also per offline discussion, I stabilized the else if let Some((target_name, target_def_id, _)) = attributes.interpret_for_contract_attribute()
|
You could use this function to get the FnDef:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for this new feature! Only a few more minor comments to go before merging it.
Co-authored-by: Felipe R. Monteiro <rms.felipe@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
Co-authored-by: Zyad Hassan <88045115+zhassan-aws@users.noreply.github.com>
Co-authored-by: Zyad Hassan <88045115+zhassan-aws@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
0400024
Implementation of the list subcommand (and updates to the RFC).
As a larger test, I ran on the standard library (
kani list -Z list -Z function-contracts -Z mem-predicates ./library --std
) and manually verified that the results were correct. I pasted the output below.Contracts:
Standard Harnesses (#[kani::proof]):
Terminal view (
--pretty
format):By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.