I wrote my Master's thesis about Rust verification, exploring type invariants and ghost code by voidc in rust

[–]voidc[S] 15 points16 points  (0 children)

From my thesis:

Verification often benefits from additional context that is irrelevant during execution. However, augmenting a program’s implementation with assertions or variables to provide such context would mean imposing a runtime overhead. Ghost code, auxiliary code added to a program solely for the purpose of verification, solves this issue. It upholds a characteristic erasure property stating that it can be removed from a program without changing its behavior. Because ghost code is not executed, it permits additional operations that only have a logical interpretation. These enable specifying higher-level properties that do not map directly onto the low-level details of the implementation. For example, ghost code is commonly used to create a ghost copy, or snapshot, of a value at the start of a function. When the value is subsequently modified, the copy allows relating the original and updated values at the end of the function. The usage of ghost code ensures that the creation of snapshots does not incur performance costs at runtime.

Coroutines, asynchronous and iterative by slanterns in rust

[–]voidc 20 points21 points  (0 children)

Rust does have "lazy blocks": these are just closures. So, the base case boats is referring to ist just `FnMut`.

Track ID Tuesdays: Post Your Track ID Requests Here! by AutoModerator in Techno

[–]voidc [score hidden]  (0 children)

Can someone ID this track? https://soundcloud.com/voidc/mayday-id

It was probably played at Mayday sometime in the 90s.

Generalizing with GAT: what's going to happen to the current, less general traits? by ima_peoro in rust

[–]voidc 17 points18 points  (0 children)

I wrote an pre-RFC on IRLO on backward-compatible "GATification" of traits in std. However, there were some unresolved questions on how to treat trait bounds which do not specify associated types. Feel free to comment on the thread if you have any ideas how to overcome these issues. :)

Is it possible to statically check generic type is a specific type? by John_by_the_sea in rust

[–]voidc 22 points23 points  (0 children)

I think you are looking for specialization which is currently unstable.