Skip to content
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

Remove kani::Arbitrary from the modifies contract instrumentation #3169

Merged

Conversation

feliperodri
Copy link
Contributor

@feliperodri feliperodri commented May 1, 2024

This is an additional fix for #3098. With this fix, Kani should be able to check for contracts using modifies clauses that contain references to types that doesn't implement kani::Arbitrary. The verification will still fail if the same contract is used as a verified stub.

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

Signed-off-by: Felipe R. Monteiro <felisous@amazon.com>
@feliperodri feliperodri self-assigned this May 1, 2024
@feliperodri feliperodri requested a review from a team as a code owner May 1, 2024 22:46
@github-actions github-actions bot added the Z-BenchCI Tag a PR to run benchmark CI label May 1, 2024
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.

How is this tested?

library/kani_macros/src/sysroot/contracts/check.rs Outdated Show resolved Hide resolved
library/kani_macros/src/sysroot/contracts/check.rs Outdated Show resolved Hide resolved
Signed-off-by: Felipe R. Monteiro <felisous@amazon.com>
@feliperodri
Copy link
Contributor Author

How is this tested?

@zhassan-aws I included an extra test to cover this case. I was testing this on the function contracts we have fore stdlib.

adpaco-aws and others added 3 commits May 3, 2024 14:53
Co-authored-by: Zyad Hassan <88045115+zhassan-aws@users.noreply.github.com>
…tion_modifies.rs

Co-authored-by: Zyad Hassan <88045115+zhassan-aws@users.noreply.github.com>
@adpaco-aws adpaco-aws enabled auto-merge (squash) May 3, 2024 18:54
@adpaco-aws adpaco-aws merged commit c0e4e1b into model-checking:main May 3, 2024
23 checks passed
karkhaz added a commit that referenced this pull request May 7, 2024
For reference, here is the auto-generated changelog

## What's Changed
* Upgrade toolchain to 2024-04-18 and improve toolchain workflow by
@celinval in #3149
* Automatic toolchain upgrade to nightly-2024-04-19 by @github-actions
in #3150
* Stabilize cover statement and update contracts RFC by @celinval in
#3091
* Automatic toolchain upgrade to nightly-2024-04-20 by @github-actions
in #3154
* Bump tests/perf/s2n-quic from `2d5e891` to `5f88e54` by @dependabot in
#3140
* Automatic cargo update to 2024-04-22 by @github-actions in
#3157
* Automatic toolchain upgrade to nightly-2024-04-21 by @github-actions
in #3158
* Bump tests/perf/s2n-quic from `5f88e54` to `9730578` by @dependabot in
#3159
* Fix cargo audit error by @jaisnan in
#3160
* Fix cbmc-update CI job by @tautschnig in
#3156
* Automatic cargo update to 2024-04-29 by @github-actions in
#3165
* Bump tests/perf/s2n-quic from `9730578` to `1436af7` by @dependabot in
#3166
* Do not assume that ZST-typed symbols refer to unique objects by
@tautschnig in #3134
* Fix copyright check for `expected` tests by @adpaco-aws in
#3170
* Remove kani::Arbitrary from the modifies contract instrumentation by
@feliperodri in #3169
* Automatic cargo update to 2024-05-06 by @github-actions in
#3172
* Bump tests/perf/s2n-quic from `1436af7` to `6dd41e0` by @dependabot in
#3174
* Avoid unnecessary uses of Location::none() by @tautschnig in
#3173


**Full Changelog**:
kani-0.50.0...kani-0.51.0

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

---------

Co-authored-by: Adrian Palacios <73246657+adpaco-aws@users.noreply.github.com>
zpzigi754 pushed a commit to zpzigi754/kani that referenced this pull request May 8, 2024
…del-checking#3169)

This is an additional fix for
model-checking#3098. With this fix, Kani
should be able to check for contracts using modifies clauses that
contain references to types that doesn't implement `kani::Arbitrary`.
The verification will still fail if the same contract is used as a
verified stub.

---------

Signed-off-by: Felipe R. Monteiro <felisous@amazon.com>
qinheping pushed a commit to qinheping/kani that referenced this pull request May 9, 2024
…del-checking#3169)

This is an additional fix for
model-checking#3098. With this fix, Kani
should be able to check for contracts using modifies clauses that
contain references to types that doesn't implement `kani::Arbitrary`.
The verification will still fail if the same contract is used as a
verified stub.

---------

Signed-off-by: Felipe R. Monteiro <felisous@amazon.com>
qinheping pushed a commit to qinheping/kani that referenced this pull request May 9, 2024
For reference, here is the auto-generated changelog

## What's Changed
* Upgrade toolchain to 2024-04-18 and improve toolchain workflow by
@celinval in model-checking#3149
* Automatic toolchain upgrade to nightly-2024-04-19 by @github-actions
in model-checking#3150
* Stabilize cover statement and update contracts RFC by @celinval in
model-checking#3091
* Automatic toolchain upgrade to nightly-2024-04-20 by @github-actions
in model-checking#3154
* Bump tests/perf/s2n-quic from `2d5e891` to `5f88e54` by @dependabot in
model-checking#3140
* Automatic cargo update to 2024-04-22 by @github-actions in
model-checking#3157
* Automatic toolchain upgrade to nightly-2024-04-21 by @github-actions
in model-checking#3158
* Bump tests/perf/s2n-quic from `5f88e54` to `9730578` by @dependabot in
model-checking#3159
* Fix cargo audit error by @jaisnan in
model-checking#3160
* Fix cbmc-update CI job by @tautschnig in
model-checking#3156
* Automatic cargo update to 2024-04-29 by @github-actions in
model-checking#3165
* Bump tests/perf/s2n-quic from `9730578` to `1436af7` by @dependabot in
model-checking#3166
* Do not assume that ZST-typed symbols refer to unique objects by
@tautschnig in model-checking#3134
* Fix copyright check for `expected` tests by @adpaco-aws in
model-checking#3170
* Remove kani::Arbitrary from the modifies contract instrumentation by
@feliperodri in model-checking#3169
* Automatic cargo update to 2024-05-06 by @github-actions in
model-checking#3172
* Bump tests/perf/s2n-quic from `1436af7` to `6dd41e0` by @dependabot in
model-checking#3174
* Avoid unnecessary uses of Location::none() by @tautschnig in
model-checking#3173


**Full Changelog**:
model-checking/kani@kani-0.50.0...kani-0.51.0

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

---------

Co-authored-by: Adrian Palacios <73246657+adpaco-aws@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Z-BenchCI Tag a PR to run benchmark CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants