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
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
48defa8
Shift intrinsics and arbitrary to kani_core
jaisnan May 31, 2024
d4e9a7b
Add contracts to scope of user crate
jaisnan Jun 3, 2024
e231f9d
Fix duplicated definitions error
celinval Jun 4, 2024
32ef011
Add one macro to rule them all...
celinval Jun 4, 2024
4d9b7fe
Merge branch 'add-3152' of https://github.com/jaisnan/kani into add-f…
jaisnan Jun 5, 2024
8103dd5
Add flag to disable test addition to std-regression script
jaisnan Jun 5, 2024
33eb53a
comment out flag for custom rust source
jaisnan Jun 5, 2024
d6e8dd0
Add flag to regression
jaisnan Jun 5, 2024
e093376
undo changes to arbitrary
jaisnan Jun 5, 2024
78328ed
Commit till the point of compiling std-lib
jaisnan Jun 6, 2024
b08dc9c
Merge branch 'add-fix-3152' of https://github.com/jaisnan/kani into a…
jaisnan Jun 6, 2024
63f3ea6
Merge branch 'main' of https://github.com/model-checking/kani into ad…
jaisnan Jun 6, 2024
4614e65
get core to compile everything but proof_for_contract
jaisnan Jun 7, 2024
18a556e
Add -Zfunction-contracts and cfg(no_core)
jaisnan Jun 7, 2024
b465652
Merge branch 'main' of https://github.com/model-checking/kani into tm…
jaisnan Jun 7, 2024
3566f9e
cargo fmt
jaisnan Jun 10, 2024
13c27cd
Merge branch 'tmp-branch-3152' into add-fix-3152
jaisnan Jun 10, 2024
e6a8189
Merge branch 'main' of https://github.com/model-checking/kani into ad…
jaisnan Jun 10, 2024
57dda05
Merge branch 'main' of https://github.com/model-checking/kani into ad…
jaisnan Jun 10, 2024
985adca
Add changes to the point where proof_for_Contract works as well.
jaisnan Jun 10, 2024
b211bac
Merge branch 'main' into add-fix-3152
jaisnan Jun 10, 2024
ce6cd61
Revert changes, and cleanup
jaisnan Jun 10, 2024
fb3b9c4
Merge branch 'main' of https://github.com/model-checking/kani into ad…
jaisnan Jun 10, 2024
752c7e9
Merge branch 'main' into add-fix-3152
jaisnan Jun 10, 2024
e0b1693
Remove -Z function contract; Add some tests related to function contr…
jaisnan Jun 10, 2024
219bee7
Merge branch 'add-fix-3152' of https://github.com/jaisnan/kani into a…
jaisnan Jun 10, 2024
a1f3a43
replace kani with kani_core
jaisnan Jun 10, 2024
e96d4a7
Add basic comments
jaisnan Jun 10, 2024
cbcbb72
Fix regression test for verify_std
jaisnan Jun 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add basic comments
  • Loading branch information
jaisnan committed Jun 10, 2024
commit e96d4a74a86a7348871916ee676116f2dfc4e74b
6 changes: 6 additions & 0 deletions library/kani_core/src/arbitrary.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
// Copyright Kani Contributors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! This macro generates implementations of the `Arbitrary` trait for various types. The `Arbitrary` trait defines
//! methods for generating arbitrary (unconstrained) values of the implementing type.
//! trivial_arbitrary and nonzero_arbitrary are implementations of Arbitrary for types that can be represented
//! by an unconstrained symbolic value of their size (e.g., `u8`, `u16`, `u32`, etc.).
//!
//! TODO: Use this inside kani library so that we dont have to maintain two copies of the same proc macro for arbitrary.
#[macro_export]
macro_rules! generate_arbitrary {
($core:path) => {
Expand Down
5 changes: 5 additions & 0 deletions library/kani_core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ macro_rules! kani_lib {
};
}

/// Kani intrinsics contains the public APIs used by users to verify their harnesses.
/// This macro is a part of kani_core as that allows us to verify even libraries that are no_core
/// such as core in rust's std library itself.
///
/// TODO: Use this inside kani library so that we dont have to maintain two copies of the same intrinsics.
#[macro_export]
macro_rules! kani_intrinsics {
() => {
Expand Down
Loading