Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Miri is not really a formal verification tool. It is more of a runtime sanitizer.

And it's because Rust's "no undefined behavior" is for safe Rust. Miri is used dynamically at runtime to catch undefined behavior in the unsafe superset.

Finally, Rust's safety guarantees relate to memory safety only. There's a lot more properties you'd want to prove about programs, some safety related in a broader sense, some totally unrelated to safety concerns.



Is it possible to find UB in "unsafe" at compile time?


By using some proof tools, you can find some of it.

It is technically impossible to find 100% of it at compile time because some of the finer details about what is UB are not nailed down 100% yet. But those are generally pretty fine corner cases, and one of the goals of those definitions is to not invalidate code as written.

Formal verification is very hard.




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

Search: