Skip to content

docs: add conc playback docs to getting started tutorial#1537

Merged
sanjit-bhat merged 29 commits intomodel-checking:mainfrom
sanjit-bhat:kani-docs
Aug 19, 2022
Merged

docs: add conc playback docs to getting started tutorial#1537
sanjit-bhat merged 29 commits intomodel-checking:mainfrom
sanjit-bhat:kani-docs

Conversation

@sanjit-bhat
Copy link
Contributor

@sanjit-bhat sanjit-bhat commented Aug 17, 2022

Description of changes:

See the title. This PR only adds doc sections.

Note that there are other sections where we could potentially add info about this feature (e.g., 5 sections name the --visualize feature). However, as per @tedinski's suggestion, we should save those changes for later once we figure out more details about how the overall tutorial flow would be impacted.

Callouts:

Some of the names used in this PR rely on the renames in #1548.

Resolved issues:

Resolves #1439, adding a doc section.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

@sanjit-bhat sanjit-bhat self-assigned this Aug 17, 2022
@sanjit-bhat sanjit-bhat requested a review from a team as a code owner August 17, 2022 16:12
@sanjit-bhat sanjit-bhat changed the title docs: add conc playback sub-section to getting started docs: add conc playback sub-section to getting started tutorial Aug 17, 2022
Copy link
Contributor

@celinval celinval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job. I added a few comments. Let me know what you think.

@sanjit-bhat sanjit-bhat changed the title docs: add conc playback sub-section to getting started tutorial rename exe_trace and add conc playback docs to getting started tutorial Aug 18, 2022
@sanjit-bhat sanjit-bhat changed the title rename exe_trace and add conc playback docs to getting started tutorial docs: add conc playback docs to getting started tutorial Aug 18, 2022
@sanjit-bhat
Copy link
Contributor Author

@celinval I added an example, but I decided to only explain a couple parts of the unit test that I thought would be most relevant to the user. Here, I define relevance as "info that's helpful if the user wants to try a different concrete value without regenerating the unit test".

@sanjit-bhat sanjit-bhat requested a review from celinval August 19, 2022 00:55
Copy link
Contributor

@celinval celinval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's great! Minor comments but not blockers.


* `error[E0425]: cannot find function x in this scope`:
this is usually caused by having `#[cfg(kani)]` somewhere in the control flow path of the user's proof harness.
To fix this, remove `#[cfg(kani)]` from those paths.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to recommend adding --cfg=kani to your rustflags.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unclear how to do this? I tried adding this to Cargo.toml, but it didn't work:

[build]
rustflags = ["--cfg=kani"]

which differ depending on what version of the Kani library you would like to use:
* The latest version:
```toml
[dev-dependencies]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe change this to [target.'cfg(Kani)'.dependencies]

So this only gets pulled when user sets --cfg kani.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might make things tricky to use. Right now, the default user flow is to click on the "Run Test" button in their IDE, which just runs under default Rust unit test configurations. So we would have to either 1) override these IDE configs or 2) conditionally add these on the test config.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are ways around that, but we can tune that later. Thanks

@sanjit-bhat sanjit-bhat merged commit 90330b2 into model-checking:main Aug 19, 2022
@sanjit-bhat sanjit-bhat deleted the kani-docs branch August 19, 2022 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Write concrete playback tutorial page

2 participants