Skip to content

Concrete playback instructions don't work if user sets --cfg=kani #1610

Description

@celinval

I tried the following:

$ cargo init dummy
$ cd dummy

I added the following line to Cargo.toml

[dev-dependencies]
kani = { git = "https://github.com/model-checking/kani", features = ["concrete_playback"] }

I opened src/main.rs

#[cfg(kani)]
mod harnesses {
  #[kani::proof]
  fn force_failure() {
    assert!(kani::any());
  }
}

using the following command line invocation:

cargo kani --enable-unstable --concrete-playback
RUSTFLAGS="--cfg=kani" cargo +nightly test

with Kani version: 0.9.0

I expected to see this happen: Cargo runs the new test and fail.

Instead, this happened: Cargo failed to build the harness with the following error:

error[E0433]: failed to resolve: use of undeclared crate or module `kanitool`
  --> src/main.rs:36:5
   |
36 |     #[kani::proof]
   |     ^^^^^^^^^^^^^^ use of undeclared crate or module `kanitool`
   |
   = note: this error originates in the attribute macro `kani::proof` (in Nightly builds, run with -Z macro-backtrace for more info)

Activity

  1. added
    [C] BugThis is a bug. Something isn't working.
    on Sep 1, 2022
  2. celinval commented on Sep 1, 2022

    @celinval
    ContributorAuthor

    Closed the wrong issue. Sorry!

  3. celinval commented on Feb 16, 2023

    @celinval
    ContributorAuthor

    As @jaisnan and I discussed offline, one solution here would be to add a concrete_playback feature to kani_macros crate the same way we have added to the kani crate.

  4. celinval commented on Feb 16, 2023

    @celinval
    ContributorAuthor

    I think we could even enable it by default and disable it when building our sysroot

  5. moved this to In Progress in Kani 2023-03-06on Mar 6, 2023
  6. moved this to In Progress in Kani 2023-04-17on Apr 3, 2023
  7. moved this from In Progress to Done in Kani 2023-04-17on Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

[C] BugThis is a bug. Something isn't working.

Type

No type

Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions