forked from model-checking/kani
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Re-enable tests that had to be disabled with the toolchain upgrade in model-checking#2149. Fixes model-checking#2286, fixes model-checking#2191. - Do not generate non-NULL pointer constants. Together with the CBMC version update this avoids the need for an unwinding annotation in the mir-linker test. Fixes model-checking#1978. - CBMC 5.79.0 ships simplifier improvements that enable constant propagation to avoid slow-down with the Display trait. Fixes model-checking#1996. - CBMC 5.79.0 ships SMT back-end fixes. Fixes model-checking#2002. Co-authored-by: Zyad Hassan <[email protected]>
- Loading branch information
1 parent
12c343e
commit 07ba909
Showing
16 changed files
with
58 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
CBMC_VERSION="5.78.0" | ||
CBMC_VERSION="5.79.0" | ||
# If you update this version number, remember to bump it in `src/setup.rs` too | ||
CBMC_VIEWER_VERSION="3.8" | ||
KISSAT_VERSION="3.0.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Copyright Kani Contributors | ||
# SPDX-License-Identifier: Apache-2.0 OR MIT | ||
|
||
[package] | ||
name = "display_trait" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Complete - 2 successfully verified harnesses, 0 failures, 2 total. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright Kani Contributors | ||
// SPDX-License-Identifier: Apache-2.0 OR MIT | ||
|
||
//! This test checks the performance when adding in the Display trait. | ||
//! The test is from https://github.com/model-checking/kani/issues/1996 | ||
//! With CBMC 5.79.0, all harnesses take ~3 seconds | ||
use std::fmt::Display; | ||
|
||
enum Foo { | ||
A(String), | ||
B(String), | ||
} | ||
|
||
impl Display for Foo { | ||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
let s = match self { | ||
Foo::A(s) => format!("A.{s}"), | ||
Foo::B(s) => format!("B.{s}"), | ||
}; | ||
write!(f, "{s}")?; | ||
Ok(()) | ||
} | ||
} | ||
|
||
#[kani::proof] | ||
#[kani::unwind(6)] | ||
fn fast() { | ||
let a = Foo::A(String::from("foo")); | ||
let s = match a { | ||
Foo::A(s) => format!("A.{s}"), | ||
Foo::B(s) => format!("B.{s}"), | ||
}; | ||
assert_eq!(s, "A.foo"); | ||
} | ||
|
||
#[kani::proof] | ||
#[kani::unwind(6)] | ||
fn slow() { | ||
let a = Foo::A(String::from("foo")); | ||
let s = a.to_string(); | ||
assert_eq!(s, "A.foo"); | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.