Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
celinval opened this issue Sep 1, 2022 · 3 comments · Fixed by #2353
Closed

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

celinval opened this issue Sep 1, 2022 · 3 comments · Fixed by #2353
Assignees
Labels
[C] Bug This is a bug. Something isn't working.

Comments

@celinval
Copy link
Contributor

celinval commented Sep 1, 2022

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)

@celinval celinval added the [C] Bug This is a bug. Something isn't working. label Sep 1, 2022
@celinval celinval closed this as completed Sep 1, 2022
@celinval
Copy link
Contributor Author

celinval commented Sep 1, 2022

Closed the wrong issue. Sorry!

@celinval
Copy link
Contributor Author

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.

@celinval
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C] Bug This is a bug. Something isn't working.
Projects
No open projects
Status: In Progress
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants