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

conflicting requirements: diagnostics vs logic #2079

Closed
2 tasks
oli-obk opened this issue Apr 21, 2022 · 4 comments
Closed
2 tasks

conflicting requirements: diagnostics vs logic #2079

oli-obk opened this issue Apr 21, 2022 · 4 comments

Comments

@oli-obk
Copy link
Contributor

oli-obk commented Apr 21, 2022

Just like the rust compiler miri is getting more complicated and tracking more data in order to improve its diagnostics. @rust-lang/wg-diagnostics has been working on improving the situation, but the big hammer we always wanted has been out of reach due to lack of resources.

Now, miri is a quite a bit smaller than rustc and its entanglement with diagnostics not as strong yet.

My proposal is basically to implement a version of #17 that allows rerunning after a failure, but this time tracking data without caring abot speed (note:speed is not the goal here, simplicity is). This requires a few things:

  • recording nondeterministic input in disable-isolation mode
  • make parts of miri generic over the additional data that should be tracked and reported
    • this will allow us to move the tracking part into its very own module and possibly even crate. I'd hope we'd be able to isolate all memory model logic into a crate that then gets used by the crate that applies extra tracking. A separate binary could be supplied that will just throw unhelpful gibberish at you, but uses only the memory model logic without any of the convenience things we added for usability.
@RalfJung
Copy link
Member

That sounds very complicated, can't we "just" to good ol' "split the code into different files"?

@oli-obk
Copy link
Contributor Author

oli-obk commented Apr 21, 2022

We can, but you'll still end up with random fields that are only useful for diagnostics in the non-diagnostics code.

It's not more complicated that the machine split, although arguably that is complicated

@RalfJung
Copy link
Member

Yeah, there's some extra (opaque) state that needs to be carried around. That seems easy though, we have experience with that with all the Extra types we already have.

@oli-obk
Copy link
Contributor Author

oli-obk commented May 12, 2022

Stashing this idea for now. It doesn't seem too problematic looking at the motivating PR #2030

@oli-obk oli-obk closed this as completed May 12, 2022
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

No branches or pull requests

2 participants