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

Take into account use statements when resolving stub paths #1998

Closed
aaronbembenek-aws opened this issue Dec 13, 2022 · 0 comments · Fixed by #2003
Closed

Take into account use statements when resolving stub paths #1998

aaronbembenek-aws opened this issue Dec 13, 2022 · 0 comments · Fixed by #2003
Labels
[C] Feature / Enhancement A new feature request or enhancement to an existing feature. [E] User Experience An UX enhancement for an existing feature. Including deprecation of an existing one.
Milestone

Comments

@aaronbembenek-aws
Copy link
Contributor

Currently, we do not account for use statements when trying to resolve paths appearing in kani::stub attributes. For example, this harness fails to compile:

fn foo() -> bool {
    false
}

fn bar() -> bool {
    true
}

mod my_mod {
    use super::*;

    #[kani::proof]
    #[kani::stub(foo, bar)]
    fn harness() {
        assert!(foo());
    }
}

We are not able to resolve either foo or bar. We should fix this, both to make easier to specify stubs, and to ensure that stubs aren't resolving to the wrong functions/methods.

@aaronbembenek-aws aaronbembenek-aws added [C] Feature / Enhancement A new feature request or enhancement to an existing feature. [E] User Experience An UX enhancement for an existing feature. Including deprecation of an existing one. labels Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C] Feature / Enhancement A new feature request or enhancement to an existing feature. [E] User Experience An UX enhancement for an existing feature. Including deprecation of an existing one.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant