NethermindEth/Clear

Interactive formal verification tool for Yul programs

Lean

85

38 commits

updated Nov 19, 2025

See the code

README

Clear.

Clear - Github (1)

Prove anything* about Yul programs.

There are two parts.

  • A Lean framework with a Yul model.
  • A verification condition generator.

The Lean framework

Download and install Lean 4. One can follow https://lean-lang.org/lean4/doc/quickstart.html.

To obtain precompiled files for the dependency Mathlib, run the following in the root directory (this is optional, it saves time):

lake exe cache get

Then simply run the following in the root directory:

lake build

The verification condition generator (vc)

Download and install Stack. One can follow https://docs.haskellstack.org/en/stable/install_and_upgrade/.

Then simply run the following in the vc directory:

stack build

Verifying it all works

In the vc directory, run:

stack run vc ../out/peano.yul

You should get a Generated folder corresponding with the structure of the Peano example in the out/peano.yul file.

Contributors

Coda-Coda

15 commits

jkopanski

12 commits

orscars

7 commits

Ferinko

3 commits

NethermindEth/Clear

Interactive formal verification tool for Yul programs

Lean

85

38 commits

updated Nov 19, 2025

See the code

README

Clear.

Clear - Github (1)

Prove anything* about Yul programs.

There are two parts.

  • A Lean framework with a Yul model.
  • A verification condition generator.

The Lean framework

Download and install Lean 4. One can follow https://lean-lang.org/lean4/doc/quickstart.html.

To obtain precompiled files for the dependency Mathlib, run the following in the root directory (this is optional, it saves time):

lake exe cache get

Then simply run the following in the root directory:

lake build

The verification condition generator (vc)

Download and install Stack. One can follow https://docs.haskellstack.org/en/stable/install_and_upgrade/.

Then simply run the following in the vc directory:

stack build

Verifying it all works

In the vc directory, run:

stack run vc ../out/peano.yul

You should get a Generated folder corresponding with the structure of the Peano example in the out/peano.yul file.

Contributors

Coda-Coda

15 commits

jkopanski

12 commits

orscars

7 commits

Ferinko

3 commits

Languages

Lean

64.8%

Haskell

31.8%

Yacc

2.2%