Using Automated Research to Build a Formally Verified Compiler
Summary
The document describes Solidus, a collaborative project to build a Solidity-to-EVM compiler in Lean, a language and proof assistant. Its backend translates Yul, Solidity’s intermediate representation, into EVM code, with a proof that compiled programs preserve the source program’s outputs under stated assumptions about external calls. Automated research challenges invite contributors to find gaps in the proposed Solidity semantics and optimize the backend while retaining its correctness proof.
The article argues that formal verification can make compiler behavior easier to trust and allow aggressive optimization with correctness certificates. It reports that the existing backend produces substantially more bytecode than a standard compiler on its test suite, motivating optimization work. The project remains pre-alpha: the frontend is incomplete, the Solidity semantics may diverge from actual behavior, and correctness is limited by the modeled assumptions. Performance and completeness are checked heuristically, and the code has not been audited or declared production-ready.
Key ideas
- Formal proofs can establish that compiler output preserves specified program behavior.
- Solidus uses Lean to verify a Yul-to-EVM backend and proposes formal semantics for Solidity.
- Automated challenges can combine semantic bug finding with optimization constrained by a correctness proof.
- Verified compiler optimization may allow broader collaboration on trusted codebases.
- The project is pre-alpha, with incomplete semantics and heuristic checks for performance and completeness.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.