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

Chapter on MIRI? #30

Closed
mark-i-m opened this issue Jan 29, 2018 · 8 comments · Fixed by #45
Closed

Chapter on MIRI? #30

mark-i-m opened this issue Jan 29, 2018 · 8 comments · Fixed by #45

Comments

@mark-i-m
Copy link
Member

... perhaps as a subchapter under the MIR chapter?

@Michael-F-Bryan
Copy link
Contributor

Weren't there plans to use miri to help with compile time function execution (constexpr)? If so, knowing how it works and how to use it may be useful.

@mark-i-m
Copy link
Member Author

@Michael-F-Bryan see rust-lang/rust#46882 which is actually very close 🎉

@oli-obk
Copy link
Contributor

oli-obk commented Jan 31, 2018

Feel free to assign this to me (so I'll find it again :D). I'll write up something.

What level of detail did you have in mind?

@mark-i-m mark-i-m assigned mark-i-m and unassigned mark-i-m Jan 31, 2018
@mark-i-m
Copy link
Member Author

@oli-obk Thanks! It doesn't look like I can actually assign you in the issue tracker, unfortunately.

I really don't know much about MIRI, but I guess this is what I was thinking:

  • What is it? What is its role in compilation/const evaluation?
  • Where does it fit into the compiler pipeline?
  • What are the important algorithms? How does it work? Where in the codebase are they defined? (We are looking for things that won't change often, rather than details).
  • Perhaps an example would be good?

In general, the goal is that after reading the chapter, somebody wanting to implement a feature that changes MIRI should be able to comfortably read the existing code and have a general idea of what needs to be modified.

@nikomatsakis nikomatsakis mentioned this issue Jan 31, 2018
20 tasks
@alexreg
Copy link
Contributor

alexreg commented Feb 1, 2018

I was just going to file this issue and nominate @eddyb to write it (who mentored me through the bits I contributed to the above PR), but it seems you've beat me too it, so yay!

@eddyb
Copy link
Member

eddyb commented Feb 1, 2018

@mark-i-m I think the important part about miri isn't the algorithms (which I can't think of any of note), but the data structures, and more specifically how miri represents values and memory allocations.

Everything else is just "match on MIR and apply each instruction to values in local variables and/or memory allocations they might point to" in a way that we could even formally describe as big/small-step semantics on MIR.

@alexreg
Copy link
Contributor

alexreg commented Feb 1, 2018

@eddyb You can probably adapt a good deal of material from the original author's report/presentation then. :-)

@mark-i-m
Copy link
Member Author

mark-i-m commented Feb 6, 2018

See #45

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 a pull request may close this issue.

5 participants