X-Git-Url: https://git.ralfj.de/web.git/blobdiff_plain/19c7dc80d5f9a5c16374648ee3032211d87765b0..a448e297bd91c98e949afcef1cd63855be7a2375:/personal/_posts/2017-05-23-internship-starting.md?ds=inline diff --git a/personal/_posts/2017-05-23-internship-starting.md b/personal/_posts/2017-05-23-internship-starting.md index 149b4f3..eb523b5 100644 --- a/personal/_posts/2017-05-23-internship-starting.md +++ b/personal/_posts/2017-05-23-internship-starting.md @@ -14,7 +14,7 @@ I meant to write this yesterday, but the morning was filled with bureaucratics a (But don't tell Aaron, my manager, or Niko, my mentor -- I was of course supposed to be working. ;) So, what concretely will I be doing in the next three months? -Based on [my prior posts]({{ site.baseurl }}{% post_url 2016-01-09-the-scope-of-unsafe %}) and me being in the [unsafe code guidelines strike team](https://internals.rust-lang.org/t/next-steps-for-unsafe-code-guidelines/3864) (which I totally forgot to announce here... I'm not good at this blogging thing, am I?), it should not be surprising that my main project is going to be related to unsafe code. +Based on [my prior posts]({% post_url 2016-01-09-the-scope-of-unsafe %}) and me being in the [unsafe code guidelines strike team](https://internals.rust-lang.org/t/next-steps-for-unsafe-code-guidelines/3864) (which I totally forgot to announce here... I'm not good at this blogging thing, am I?), it should not be surprising that my main project is going to be related to unsafe code. More specifically, we want to figure out ways to specify what unsafe code is and what it is not allowed to do (i.e., when its behavior is well-defined, and when it is undefined). Ultimately, the way I think this should be specified (and lucky enough, my new bosses agree on this) is by defining, for every possible Rust (or rather, MIR) program one could write, what that program is going to do when it is executed. @@ -31,7 +31,7 @@ And finally, an interpreter can be used for testing: We could actually check wh This will be very important while we are still developing the specification (to check whether our intuition for what should and should not be allowed matches the interpreter), but it is also extremely useful later for authors of unsafe code to check whether they are violating the rules we are going to put in place. Lucky enough, such an interpreter already exists: [miri](https://github.com/solson/miri)! -That's great, because it means I do not have to write an interpreter from scratch, defining what a stack is and how to perform integers operations and whatnot. +That's great, because it means I do not have to write an interpreter from scratch, defining what a stack is and how to perform integer operations and whatnot. Instead, I can concentrate on the interesting questions coming up in the unsafe code guidelines: What exactly do the guarantees "mutable borrows don't have aliases" and "the pointees of shared borrows are not mutated" *mean*? How should they be reflected in a semantics of MIR -- in miri -- such that the desired [optimizations](https://github.com/nikomatsakis/rust-memory-model/tree/master/optimizations) are actually legal, while at the same time the [unsafe code](https://doc.rust-lang.org/nomicon/) people write has the desired behavior?