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.
Update CBMC version to 5.79.0 (model-checking#2301)
Co-authored-by: Zyad Hassan <[email protected]>
- Loading branch information
1 parent
12c343e
commit 048b598
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.