generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 129
Open
Labels
T-CBMCIssue related to an existing CBMC issueIssue related to an existing CBMC issue[C] BugThis is a bug. Something isn't working.This is a bug. Something isn't working.[E] PerformanceTrack performance improvement (Time / Memory / CPU)Track performance improvement (Time / Memory / CPU)
Description
I tried this code:
#[kani::proof]
#[kani::unwind(4)]
#[kani::solver(cadical)]
fn main() {
let mut s = String::with_capacity(3);
//let c1 = 'a';
let c1: char = kani::any();
kani::assume(c1 == 'a');
s.push(c1);
s.push('.');
let c2 = 'b';
s.push(c2);
let v: Vec<&str> = s.split('.').collect();
assert_eq!(v.len(), 2);
assert_eq!(v[0], "a");
assert_eq!(v[1], "b");
}using the following command line invocation:
kani test.rs
with Kani version: 048b598
The version that uses let c1 = 'a'; verifies in ~1 second, but for the version the uses:
let c1: char = kani::any();
kani::assume(c1 == 'a');memory consumption reaches 30 GB.
Metadata
Metadata
Assignees
Labels
T-CBMCIssue related to an existing CBMC issueIssue related to an existing CBMC issue[C] BugThis is a bug. Something isn't working.This is a bug. Something isn't working.[E] PerformanceTrack performance improvement (Time / Memory / CPU)Track performance improvement (Time / Memory / CPU)