Skip to content

Commit

Permalink
Maintain test execution performance with newer CaDiCaL versions (mode…
Browse files Browse the repository at this point in the history
…l-checking#3381)

CBMC using CaDiCaL 1.9.2 and later have substantially worse performance
on these tests than CaDiCaL 1.7.2, which CBMC 5.95.1 uses. Using MiniSat
will make sure performance remains consistent.
  • Loading branch information
tautschnig authored Jul 25, 2024
1 parent ae3bdb2 commit abcb54e
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 0 deletions.
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 abcb54e

Please sign in to comment.