Rustc-dev-guide: Chapter on MIRI?

Created on 29 Jan 2018  路  8Comments  路  Source: rust-lang/rustc-dev-guide

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

Most helpful comment

@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.

All 8 comments

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.

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

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?

@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.

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!

@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.

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

See #45

Was this page helpful?
0 / 5 - 0 ratings

Related issues

crlf0710 picture crlf0710  路  3Comments

kenta7777 picture kenta7777  路  5Comments

nikomatsakis picture nikomatsakis  路  8Comments

alexreg picture alexreg  路  3Comments

mark-i-m picture mark-i-m  路  7Comments