Skip to main content

28 posts tagged with "Rust"

View All Tags

· 6 min read

Our tool coq-of-rust translates 🦀 Rust code into Coq. There we can specify what a function should do and prove that its translation satisfies the specification.

Our tool coq-of-rust works by translating Rust programs to the general proof system 🐓 Coq. Here we explain how we translate match patterns from Rust to Coq. The specificity of Rust patterns is to be able to match values either by value or reference.

· 20 min read

Our tool coq-of-rust translates 🦀 Rust code into Coq. There we can specify what a function should do and prove that its translation satisfies the specification.

Here, we show how we formally verify an ERC-20 smart contract written in Rust for the Aleph Zero blockchain. ERC-20 smart contracts are used to create new kinds of tokens in an existing blockchain. Examples are stable coins such as the 💲USDT.

· 6 min read

We continued our work on coq-of-rust, a tool to formally verify Rust programs using the proof system Coq 🐓. This tool represents Rust programs in Coq, where we can state and prove properties of the translated functions.

We present two main improvements we made to coq-of-rust:

  • Using the THIR intermediate language of Rust to have more information during the translation to Coq.
  • Bundling the type-classes representing the traits of Rust to have faster type-checking in Coq.

· 8 min read

In our project coq-of-rust we translate programs written in Rust to equivalent programs in the language of the proof system Coq 🐓, which will later allow us to formally verify them. Both Coq and Rust have many unique features, and there are many differences between them, so in the process of translation we need to treat the case of each language construction separately. In this post, we discuss how we translate the most complicated one: traits.

· 5 min read

We are diversifying ourselves to apply formal verification on 3️⃣ new languages with Solidity, Rust, and TypeScript. In this article we describe our approach. For these three languages, we translate the code to the proof system 🐓 Coq. We generate the cleanest 🧼 possible output to simplify the formal verification 📐 effort that comes after.

A formal proof can establish that a function satisfies its specification for every input in the specified domain. Tests exercise particular inputs and also run the implementation with its actual dependencies.