Introduction
The Aleph Zero blockchain gave us a huge opportunity to develop formal verification tools for the Rust and Solidity languages, to whom we are very thankful! 🙏
Here are the two resulting tools, which are open-source and available for anyone knowledgeable in the formal system 🐓 Coq:
In both cases we translate the source language to a shallow embedding in Coq, with an output optimized to:
- express specifications and verify them,
- cover a large part of the source language.
In the case of Rust, we translate the code from the THIR intermediate representation, and can translate the code of the standard library of Rust (alloc and core, see this blog post 🦀 Translation of the Rust's core and alloc crates).
The goal is to verify properties of Rust and Solidity contracts on Aleph Zero. For example, the Rust milestone states which messages preserve the token supply in the ERC-20 model. Each proof depends on how the source language and its primitives are represented in Coq.