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

Add intrinsics and Arbitrary support for no_core #3230

Merged
merged 29 commits into from
Jun 11, 2024

Conversation

jaisnan
Copy link
Contributor

@jaisnan jaisnan commented Jun 5, 2024

Approach So far

The approach so far has been to shift the kani library's functionality to kani_core instead, which has no dependencies of its own. By moving these API functions to macros, we delay the compilation of these to when Kani is invoked.

Tested by using the regression tests added @celinval in #3236 using the new verify-std subcommand.

Running Kani

To test Kani itself, we injected a proof inside the core library by making these changes.

#[cfg(kani)]
kani_core::kani_lib!(core);

#[cfg(kani)]
#[unstable(feature = "kani", issue = "none")]
pub mod verify {
    use crate::kani;

    #[kani::proof]
    pub fn harness() {
        kani::assert(true, "yay");
    }
}

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

@jaisnan jaisnan requested a review from a team as a code owner June 5, 2024 19:31
@github-actions github-actions bot added the Z-BenchCI Tag a PR to run benchmark CI label Jun 5, 2024
Copy link
Contributor

@celinval celinval left a comment

Choose a reason for hiding this comment

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

Awesome! Thanks

kani-driver/src/call_cargo.rs Outdated Show resolved Hide resolved
library/kani/Cargo.toml Outdated Show resolved Hide resolved
@jaisnan jaisnan enabled auto-merge (squash) June 11, 2024 01:33
@jaisnan jaisnan merged commit eeb5fe7 into model-checking:main Jun 11, 2024
22 of 23 checks passed
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.

2 participants