Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
A PLT Redex model of Rust, almost (github.com/lkuper)
48 points by luu on Sept 4, 2013 | hide | past | favorite | 8 comments


From lkuper (on the #rust IRC channel):

If anyone here has an HN account, perhaps you could comment and clarify that I wrote that thing in April 2011, when Rust was a very different language, and even then, I only modeled a tiny subset of the language.


Thanks for the headsup. Would be interesting to know more about in what respects Rust was different, and why this lang is out of date.


I don't really know what has changed in Rust over time (though a fair amount has changed in Redex (and some in Racket) since this was written, particularly an improved way to write a type checker). Skimming over the current version of the Rust tutorial, it looks like the model doesn't include the full variety of pointer types (just boxes with no notion of ownership), pattern matching/algebraic data types (it does have tuples and projection), or concurrency, and the model's type system is monomorphic. One TODO is for the stack (I'm not sure what there is to do for that). The other is for assignment. This would typically be a reduction step that changes the contents of the heap, but maybe there was still some question about the details of that change (such as whether/when to drop unreachable heap cells). I expect Rust's concurrency would require some more thought about how best to represent program state and some changes to the type system.


What's a PLT Redex, you ask? http://redex.racket-lang.org/


If you are interested in a formal model of Rust, https://github.com/nikomatsakis/rust-formal is probably a better choice.


(Note that this is also very old.)


It seems as if formal models of Rust have a tendency to rust.


Haha, anything not in the source tree of Rust (or Servo) tends to rust... things change quickly.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: