Skip to content

Commit

Permalink
Test performance with CBMC using CaDiCaL 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tautschnig committed Jul 23, 2024
1 parent 9d2e3e5 commit b7b3b15
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/expected/shadow/slices/slice_of_array/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const N: usize = 16;
static mut SM: kani::shadow::ShadowMem<bool> = kani::shadow::ShadowMem::new(false);

#[kani::proof]
#[kani::unwind(31)]
#[kani::unwind(17)]
fn check_slice_init() {
let arr: [char; N] = kani::any();
// tag every element of the array as initialized
Expand Down
1 change: 1 addition & 0 deletions tests/kani/FloatingPoint/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ macro_rules! test_floats {
}

#[kani::proof]
#[kani::solver(minisat)]
fn main() {
assert!(1.1 == 1.1 * 1.0);
assert!(1.1 != 1.11 / 1.0);
Expand Down
2 changes: 2 additions & 0 deletions tests/kani/Intrinsics/Math/Rounding/Ceil/ceilf64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ fn test_conc_sci() {
}

#[kani::proof]
#[kani::solver(minisat)]
fn test_towards_inf() {
let x: f64 = kani::any();
kani::assume(!x.is_nan());
Expand All @@ -53,6 +54,7 @@ fn test_towards_inf() {
}

#[kani::proof]
#[kani::solver(minisat)]
fn test_diff_one() {
let x: f64 = kani::any();
kani::assume(!x.is_nan());
Expand Down
2 changes: 2 additions & 0 deletions tests/kani/Intrinsics/Math/Rounding/Floor/floorf64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ fn test_conc_sci() {
}

#[kani::proof]
#[kani::solver(minisat)]
fn test_towards_neg_inf() {
let x: f64 = kani::any();
kani::assume(!x.is_nan());
Expand All @@ -53,6 +54,7 @@ fn test_towards_neg_inf() {
}

#[kani::proof]
#[kani::solver(minisat)]
fn test_diff_one() {
let x: f64 = kani::any();
kani::assume(!x.is_nan());
Expand Down
2 changes: 2 additions & 0 deletions tests/kani/Intrinsics/Math/Rounding/NearbyInt/nearbyintf32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ fn test_conc_sci() {
}

#[kani::proof]
#[kani::solver(minisat)]
fn test_towards_nearest() {
let x: f32 = kani::any();
kani::assume(!x.is_nan());
Expand Down Expand Up @@ -88,6 +89,7 @@ fn test_towards_nearest() {
}

#[kani::proof]
#[kani::solver(minisat)]
fn test_diff_half_one() {
let x: f32 = kani::any();
kani::assume(!x.is_nan());
Expand Down
2 changes: 2 additions & 0 deletions tests/kani/Intrinsics/Math/Rounding/NearbyInt/nearbyintf64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ fn test_conc_sci() {
}

#[kani::proof]
#[kani::solver(minisat)]
fn test_towards_nearest() {
let x: f64 = kani::any();
kani::assume(!x.is_nan());
Expand Down Expand Up @@ -88,6 +89,7 @@ fn test_towards_nearest() {
}

#[kani::proof]
#[kani::solver(minisat)]
fn test_diff_half_one() {
let x: f64 = kani::any();
kani::assume(!x.is_nan());
Expand Down
2 changes: 2 additions & 0 deletions tests/kani/Intrinsics/Math/Rounding/RInt/rintf32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ fn test_conc_sci() {
}

#[kani::proof]
#[kani::solver(minisat)]
fn test_towards_nearest() {
let x: f32 = kani::any();
kani::assume(!x.is_nan());
Expand Down Expand Up @@ -93,6 +94,7 @@ fn test_towards_nearest() {
}

#[kani::proof]
#[kani::solver(minisat)]
fn test_diff_half_one() {
let x: f32 = kani::any();
kani::assume(!x.is_nan());
Expand Down
2 changes: 2 additions & 0 deletions tests/kani/Intrinsics/Math/Rounding/RInt/rintf64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ fn test_conc_sci() {
}

#[kani::proof]
#[kani::solver(minisat)]
fn test_towards_nearest() {
let x: f64 = kani::any();
kani::assume(!x.is_nan());
Expand Down Expand Up @@ -93,6 +94,7 @@ fn test_towards_nearest() {
}

#[kani::proof]
#[kani::solver(minisat)]
fn test_diff_half_one() {
let x: f64 = kani::any();
kani::assume(!x.is_nan());
Expand Down
2 changes: 2 additions & 0 deletions tests/kani/Intrinsics/Math/Rounding/Round/roundf32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ fn test_conc_sci() {
}

#[kani::proof]
#[kani::solver(minisat)]
fn test_towards_closer() {
let x: f32 = kani::any();
kani::assume(!x.is_nan());
Expand All @@ -61,6 +62,7 @@ fn test_towards_closer() {
}

#[kani::proof]
#[kani::solver(minisat)]
fn test_diff_half_one() {
let x: f32 = kani::any();
kani::assume(!x.is_nan());
Expand Down
2 changes: 2 additions & 0 deletions tests/kani/Intrinsics/Math/Rounding/Round/roundf64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ fn test_conc_sci() {
}

#[kani::proof]
#[kani::solver(minisat)]
fn test_towards_closer() {
let x: f64 = kani::any();
kani::assume(!x.is_nan());
Expand All @@ -61,6 +62,7 @@ fn test_towards_closer() {
}

#[kani::proof]
#[kani::solver(minisat)]
fn test_diff_half_one() {
let x: f64 = kani::any();
kani::assume(!x.is_nan());
Expand Down
2 changes: 2 additions & 0 deletions tests/kani/Intrinsics/Math/Rounding/Trunc/truncf64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ fn test_conc_sci() {
}

#[kani::proof]
#[kani::solver(minisat)]
fn test_towards_zero() {
let x: f64 = kani::any();
kani::assume(!x.is_nan());
Expand All @@ -50,6 +51,7 @@ fn test_towards_zero() {
}

#[kani::proof]
#[kani::solver(minisat)]
fn test_diff_one() {
let x: f64 = kani::any();
kani::assume(!x.is_nan());
Expand Down

0 comments on commit b7b3b15

Please sign in to comment.