Skip to content

Add second section of the tutorial#481

Merged
tedinski merged 5 commits into
model-checking:mainfrom
tedinski:tutorial-2
Sep 15, 2021
Merged

Add second section of the tutorial#481
tedinski merged 5 commits into
model-checking:mainfrom
tedinski:tutorial-2

Conversation

@tedinski

Copy link
Copy Markdown
Contributor

Description of changes:

This adds section 2/3 of the currently planned RMC tutorial.

Resolved issues:

Towards #254

Call-outs:

  • I did not include very extensive pointer material, it seems a lot less natural to talk about raw pointers in Rust. So I reduced that to a subsection of the bounds checking material.

Testing:

  • How is this change tested? Each example in the cargo package fails RMC.

  • Is this a refactor change? No

Checklist

  • Each commit message has a non-empty body, explaining why the change was made
  • [n/a] Methods or procedures are documented
  • [n/a] Regression or unit tests are included, or existing tests cover the modified code
  • My PR is restricted to a single feature or bugfix

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

@tedinski tedinski mentioned this pull request Sep 14, 2021
12 tasks
Comment thread rmc-docs/src/tutorial-kinds-of-failure.md Outdated
Comment thread rmc-docs/src/tutorial-kinds-of-failure.md Outdated
Comment thread rmc-docs/src/tutorial-kinds-of-failure.md
Comment thread rmc-docs/src/tutorial-kinds-of-failure.md
Comment thread rmc-docs/src/tutorial-kinds-of-failure.md Outdated
Comment on lines +136 to +150
## Future work

RMC notably does not check the following:

1. Concurrency bugs, deadlocks, or data races.
It's possible RMC may be extended in the future to find such issues.

2. Rust type invariants.
For example, it's undefined behavior in Rust to produce a value of type `bool` that isn't `0` or `1`.
RMC will not spot this error (in presumably unsafe code), yet.

3. Fully generic functions.
To write a proof harness and call functions, they must be fully "monomorphized."
This means we can't currently check a generic function (`foo<T>`) generically.
Proof harnesses have to be written specializing type parameters (`T`) to concrete types (e.g. `u32`), and check those instead.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd prefer to link to the dashboard so this information doesn't become stale

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I tried to stick to bigger ideas here than what the dashboard really shows. Set people's expectations appropriately.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ok, in that case, could we make the statement "does not currently check"?

Comment thread rmc-docs/src/SUMMARY.md
- [RMC on a crate]()
- [Debugging failures]()

- [Debugging non-termination]()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this section coming in the next batch? If so, should we take it out from this PR?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

mdbook supports "outlining" like this as a specifically added feature. Seems nice to use, and it makes the planned structure visible.

Comment thread rmc-docs/src/SUMMARY.md

@zhassan-aws zhassan-aws left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great examples, @tedinski!

Comment thread rmc-docs/src/tutorial-kinds-of-failure.md Outdated
@tedinski tedinski merged commit 825e2e9 into model-checking:main Sep 15, 2021
@tedinski tedinski deleted the tutorial-2 branch September 16, 2021 15:26
tedinski added a commit to tedinski/rmc that referenced this pull request Apr 26, 2022
* initial draft of 2nd tutorial section

* add exercise solutions, fix minor issues
tedinski added a commit that referenced this pull request Apr 27, 2022
* initial draft of 2nd tutorial section

* add exercise solutions, fix minor issues
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.

3 participants