"Nine Rules to Formally Validate Rust Algorithms with Dafny" #4722
CarlKCarlK
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wanted to mathematically prove the correctness of an algorithm in range-set-blaze, a Rust crate. Rust-specific solutions seemed too hard to use or not good for general algorithmic verification. So, I ported the algorithm to Dafny and (with help from Divyanshu Ranjan) completed the proof.
We've written up our experience in a free article in Towards Data Science/Medium. It goes over what we learned with examples and tips in the form of "rules". Some might read our write up and be discouraged that the process is not easier or more automatic. I, however, am encouraged that the process is possible at all.
The biggest surprise? That a working validation can stop working because the random search changes. That led to Rule 9: "Rework Your Validation for Reliability.".
Dafny folks may also be interested in our conclusion. Here is an excerpt:
Thanks to the Dafny community for both Dafny itself and for answering my many questions while working on this project!
--Carl
p.s. The "Rules":
Beta Was this translation helpful? Give feedback.
All reactions