Skip to content

Conversation

adpaco-aws
Copy link
Contributor

@adpaco-aws adpaco-aws commented Mar 6, 2023

Description of changes:

Users may want to express that a verification harness should panic.
This RFC proposes a new harness attribute #[kani::should_panic] that informs Kani about this expectation.

Rendered preview here.

Resolved issues:

Related #600

Call-outs:

Testing:

  • How is this change tested? N/A

  • Is this a refactor change? N/A

Checklist

  • Each commit message has a non-empty body, explaining why the change was made
  • Methods or procedures are documented
  • Regression or unit tests are included, or existing tests cover the modified code
  • My PR is restricted to a single feature or bugfix

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

@adpaco-aws adpaco-aws added the T-RFC Label RFC PRs and Issues label Mar 6, 2023
@adpaco-aws adpaco-aws requested a review from a team as a code owner March 6, 2023 22:29
@adpaco-aws adpaco-aws changed the title RFC: The kani::should_fail attribute RFC: The kani::should_panic attribute Mar 10, 2023
@adpaco-aws
Copy link
Contributor Author

Addressed comments on the PR and from our discussion yesterday:

  • Moved discussion about multiple panics to UX section, and extended it significantly.
  • Provide answers for all questions that were open, and move them to a subsection "resolved questions".
  • Add new alternative to mention the Kani-API-that-takes-closure approach.
  • Modified representations, and selected the second one as the recommended.
  • Added third motivating reason for the attribute.

Copy link
Contributor

@zhassan-aws zhassan-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just one comment.

@adpaco-aws adpaco-aws merged commit 38d1f6f into model-checking:main Mar 23, 2023
@adpaco-aws adpaco-aws mentioned this pull request Apr 7, 2023
4 tasks
adpaco-aws added a commit that referenced this pull request Jan 12, 2024
…tions (#2967)

This PR is the next step to rework/introduce the
`should_panic`/`fail_uncoverable` options as global conditions.

Until now, we haven't had a concrete proposal to do so other than the
implementation in #2532. This PR presents one for each option in their
respective RFCs. I'd like to agree on this design before starting the
code review for #2532.

Related to #1905 #2272 #2299 #2516
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-RFC Label RFC PRs and Issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants