Skip to content

Add intrinsics and Arbitrary support for no_core#3230

Merged
jaisnan merged 29 commits intomodel-checking:mainfrom
jaisnan:add-fix-3152
Jun 11, 2024
Merged

Add intrinsics and Arbitrary support for no_core#3230
jaisnan merged 29 commits intomodel-checking:mainfrom
jaisnan:add-fix-3152

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-EndToEndBenchCI 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

@jaisnan jaisnan enabled auto-merge (squash) June 11, 2024 01:33
@jaisnan jaisnan merged commit eeb5fe7 into model-checking:main Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Z-EndToEndBenchCI Tag a PR to run benchmark CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants