Skip to content

Allow successful verification with unimplemented code path #3746

Closed Answered by zhassan-aws
CharlyCst asked this question in Q&A
Discussion options

You must be logged in to vote

A branch/execution path can be blocked using kani::assume(false). So you can update the macro to be:

macro_rules! non_kani_panic {
   ($($arg:tt)*) => {
        if cfg!(kani) {
            kani::assume(false);
        } else {
            panic!($($arg)*)
        }
    };
}

One needs to be careful with assume(false) though because it may lead to vacuous proofs.

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@zhassan-aws
Comment options

@zhassan-aws
Comment options

@CharlyCst
Comment options

@zhassan-aws
Comment options

Answer selected by CharlyCst
@CharlyCst
Comment options

@zhassan-aws
Comment options

@CharlyCst
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants