122 points · by todsacerdoti · 3y ago · 4 comments
This being safe Rust, it fixes the undefined behavior in the C++ version. You can of course implement that in unsafe Rust, but I can't quite bring myself to post that.
Sometimes you can encode properties that might initially seem hard to state in TLA+ in a similar way. Lamport has a recent paper explaining how to do that for hyperproperties such as information-flow security: http://lamport.azurewebsites.net/pubs/pubs.html?from=https:/...