Replies: 2 comments 1 reply
-
|
With Kani's reachability analysis, I got all nested callees of standard_proof: [src/functions/kani/reachability.rs:79:5] item_names = [
"kani::kani_intrinsic::<u8>",
"kani::assert",
"kani::any_raw::<u8>",
"verify::standard_proof",
"kani::any_raw_internal::<u8>",
"kani::any::<u8>",
"<u8 as kani::Arbitrary>::any",
]Hooray! But still no |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
@zjp-CN, Kani overrides the definition of So what happens is that the following statement assert_eq!(val, 1, "Not eq to 1.");is being expanded to kani::assert(val == 1);
if false {
format!("Not eq to 1")
}You can see this by setting I'm assuming that MIR optimization passes are removing the obviously dead code, so the format call does not show up in StableMIR. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
HIR and MIR can emit different function calls for the same body:
(
-was from HIR,+was from StableMIR)"func": "fn standard_proof() {\n let val: u8 = kani::any();\n assert_eq!(val, 1, \"Not eq to 1.\");\n }", "callees": [ - "DefId(3:10310 ~ core[abab]::panicking::panic_fmt)", - "DefId(20:281 ~ kani[75bd]::assert)", - "DefId(20:283 ~ kani[75bd]::any)" + "FnDef(DefId { id: 5, name: \"kani::any\" })", + "FnDef(DefId { id: 6, name: \"kani::assert\" })"core[abab]::panicking::panic_fmtis omitted by stable mir, which is confusing.Beta Was this translation helpful? Give feedback.
All reactions