X-Git-Url: https://git.ralfj.de/web.git/blobdiff_plain/b0ae948bd5717d2e779cbae6b9bc1f0498e7ecc5..4ff0d6f1866f9f6509c5a0abc70cfa1f92d76deb:/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 c828316..b20c7c3 100644 --- a/personal/_posts/2017-05-23-internship-starting.md +++ b/personal/_posts/2017-05-23-internship-starting.md @@ -1,5 +1,5 @@ --- -title: "Day 1 of My Mozilla Internship, or: How to Specify Program Behavior?" +title: "How to Specify Program (Undefined) Behavior?" categories: internship rust --- @@ -7,6 +7,8 @@ This summer, I am given the awesome opportunity of spending three months in the I am extremely grateful that Mozilla is providing this opportunity to me; hopefully I can give something back by making some hands-on contributions to the Rust ecosystem. +**Update:** This post was originally titled "Day 1 of My Mozilla Internship, or: How to Specify Program Behavior?" but I feel that did not really reflect its content very well. **/Update** + Today is day 1 of my internship -- at least if you start counting at 0, which of course we all do. I meant to write this yesterday, but the morning was filled with bureaucratics and in the afternoon I got so jetlagged, I essentially was sleeping with my eyes open. (But don't tell Aaron, my manager, or Niko, my mentor -- I was of course supposed to be working. ;) @@ -29,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?