Get the latest tech news

Translation of Rust's core and alloc crates to Coq for formal verification


We continue our work on formal verification of Rust programs with our tool coq-of-rust, to translate Rust code to the formal proof system Coq. One of the limitation we had was the handling of primitive constructs from the standard library of Rust, like Option::unwrapordefault or all other primitive functions. For each of these functions, we had to make a Coq definition to represent its behavior. This is both tedious and error prone.

with a module name that includes the where clauses of the impl block, stating that both K and V should implement the Default trait. In particular, showing that simulations are equivalent to the original Rust code requires doing the name resolution, introduction of high-level types, and removal of the side-effects. Formal verification provides the highest level of safety for critical applications, with a mathematical guarantee of the absence of bugs for a given specification.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Core

Core

Photo of Rust

Rust

Photo of translation

translation

Related news:

News photo

Latest Version of Android Has Gemini AI at Its Core

News photo

Rust 1.78 Upgrade For Linux 6.10, Dropping In-Tree "alloc" Fork To Save ~10k Lines

News photo

Eventual (YC W22) Is Hiring Software Engineers to Build a Query Engine in Rust