You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, the assertion in the test function does not verify and Prusti reports an error. I checked the Viper dump and the x > 123 precondition is not assumed at the beginning of the function, but it should be. I suspect that for some reason all specifications are ignored while running cargo-prusti. Maybe this is related to the cfg(prusti) compilation flag.
This issue also shows that cargo-prusti is not properly tested. We really need #3.
The text was updated successfully, but these errors were encountered:
This is actually an unsoundness of cargo-prusti, because by ignoring specifications it doesn't generate verification errors for e.g. the following program reported by @rishitc. prusti-rustc and the Prusti IDE don't have this issue.
#![allow(unused)]fnmain(){externcrate prusti_contracts;use prusti_contracts::*;#[ensures((result == a && result != b) || (result == a && result == b))]fnmax(a:i32,b:i32) -> i32{if a > b {
a
}else{
b
}}}
I tried running
cargo-prusti
on the following crate:Cargo.toml
:src/main.rs
:However, the assertion in the
test
function does not verify and Prusti reports an error. I checked the Viper dump and thex > 123
precondition is not assumed at the beginning of the function, but it should be. I suspect that for some reason all specifications are ignored while runningcargo-prusti
. Maybe this is related to thecfg(prusti)
compilation flag.This issue also shows that
cargo-prusti
is not properly tested. We really need #3.The text was updated successfully, but these errors were encountered: