Skip to content

Commit 95df30e

Browse files
committed
doc: rename the proof assistant to Rocq
1 parent 24a384c commit 95df30e

File tree

16 files changed

+112
-111
lines changed

16 files changed

+112
-111
lines changed
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Coq
1+
name: Rocq
22

33
on:
44
push:
@@ -20,26 +20,26 @@ jobs:
2020
- name: Download Git submodules
2121
run: git submodule update --init --recursive
2222

23-
- name: Run the Coq tests
23+
- name: Run the Rocq tests
2424
uses: coq-community/docker-coq-action@v1
2525
with:
2626
custom_image: coqorg/coq:8.17-ocaml-4.14-flambda
2727
custom_script: |
2828
startGroup "Install dependencies"
2929
sudo ln -s `which python3` /usr/bin/python
30-
opam install -y --deps-only CoqOfNoir/coq-of-noir.opam
30+
opam install -y --deps-only RocqOfNoir/rocq-of-noir.opam
3131
endGroup
3232
startGroup "Change permissions"
3333
sudo chown -R $(whoami) .
3434
endGroup
35-
startGroup "Convert to Coq"
36-
python scripts/coq_of_noir.py CoqOfNoir/base64/monomorphized_program.json >CoqOfNoir/base64/monomorphic.v
35+
startGroup "Convert to Rocq"
36+
python scripts/rocq_of_noir.py RocqOfNoir/base64/monomorphized_program.json >RocqOfNoir/base64/monomorphic.v
3737
endGroup
3838
startGroup "Check that the diff is empty (excluding submodules)"
3939
git -c color.ui=always diff --exit-code --ignore-submodules=dirty
4040
endGroup
41-
startGroup "Compile Coq translations"
42-
cd CoqOfNoir
41+
startGroup "Compile Rocq translations"
42+
cd RocqOfNoir
4343
make
4444
cd ..
4545
endGroup

README.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,37 @@
1-
# ◼️🐓 coq-of-noir
1+
# ◼️🐓 rocq-of-noir
22

3-
With `coq-of-noir`, we provide an **open-source and extensive way to formally verify smart contracts written in ⬛ Noir**. Formal verification is about checking for any possible input that your code has no security issues, what is essential for code deployed on the blockchain! 🛡️
3+
With `rocq-of-noir`, we provide an **open-source and extensive way to formally verify smart contracts written in ⬛ Noir**. Formal verification is about checking for any possible input that your code has no security issues, what is essential for code deployed on the blockchain! 🛡️
44

5-
To keep things simple, we rely on the well-known proof assistant [Rocq](https://rocq-prover.org/) for all the verification work: if you are already knowledgeable into this system, you can readily use `coq-of-noir` to verify your smart contracts!
5+
To keep things simple, we rely on the well-known proof assistant [Rocq](https://rocq-prover.org/) for all the verification work: if you are already knowledgeable into this system, you can readily use `rocq-of-noir` to verify your smart contracts!
66

77
## 🏎️ Getting Started
88

9-
Follow what we do in our CI file [coq.yml](.github/workflows/coq.yml). Sorry for not having the time to provide more explanations!
9+
Follow what we do in our CI file [rocq.yml](.github/workflows/rocq.yml). Sorry for not having the time to provide more explanations!
1010

1111
## ✅ What Works
1212

13-
The following steps work:
13+
The following functionalities are currently implemented:
1414

15-
- A generated translation of the `base64` library of Noir to Coq in a code that compiles; we should thus support a large part of the Noir language.
16-
- Semantics rules to reason on code like the above together with a proof strategy. This should already cover most of the Noir language.
17-
- A formally verified functional specification of one of the functions with a loop from the `base64` library, exercising mutations and array access. We consider this to be our main test to see that `coq-of-noir` can work on non-trivial examples.
15+
- **Translation:** Automatic translation of Noir programs to a representation in Rocq.
16+
- **Semantics:** Formal semantics for reasoning about the translated Noir code.
17+
- **Proof Strategy:** A proof strategy to formally verify properties of Noir programs.
18+
- **Verified Example:** A verified functional specification of a non-trivial example (base64 loop) demonstrating mutation and array access handling.
1819

19-
Note that the proof process is still very verbose, and this tool is still a work in progress. Contact us at [contact@formal.land](mailto:contact@formal.land) or by direct message on our [X account](https://x.com/FormalLand) if you are interested.
20+
Contact us at [contact@formal.land](mailto:contact@formal.land) or by direct message on our [X account](https://x.com/FormalLand) if you are interested.
2021

2122
## 🔭 Goal and Vision
2223

2324
The goal is to enable each team developing critical applications (meaning handling user money) to verify the correctness of their code with the higest degree of certainty thanks to **formal verification**.
2425

25-
For those who do not know, formal verification is a technique to verify software for 100% of possible execution parameters. **This means that the code cannot have bugs or vulnerabilities!** Initially applied to software from the spacial/defense industry, the key idea is to mathematically reason about the code to talk about possibly infinitely many possible cases, and to verify all the reasoning by a dedicated tool called a proof checker, in our case 🐓 Coq.
26+
For those who do not know, formal verification is a technique to verify software for 100% of possible execution parameters. **This means that the code cannot have bugs or vulnerabilities!** Initially applied to software from the spacial/defense industry, the key idea is to mathematically reason about the code to talk about possibly infinitely many possible cases, and to verify all the reasoning by a dedicated tool called a proof checker, in our case 🐓 Rocq.
2627

27-
In this repository, we provide a command to automatically translate a Noir program to a representation in Coq. We translate the code after the monomorphisation phase of the Noir compiler so that we do not have to deal with polymorphism or type classes. Instead, one can reconstruct this organization of the code on the Coq side in a refinement step, if needed.
28+
In this repository, we provide a command to automatically translate a Noir program to a representation in Rocq. We translate the code after the monomorphisation phase of the Noir compiler so that we do not have to deal with polymorphism or type classes. Instead, one can reconstruct this organization of the code on the Rocq side in a refinement step, if needed.
2829

2930
This translation is a shallow embedding optimized to write specifications and proofs about the code. As we erase all the types during the translation to keep only the values, we recommend doing a first proof step that reconstructs these types. This first proof step is also an opportunity to explicit the structure of the global state.
3031

3132
Our initial target is to verify a part of the [base64](https://github.com/noir-lang/noir_base64), which uses field arithmetic for optimizations. It also includes many loops, which are generally non-trivial to fully verify with formal verification.
3233

33-
_If you have a Noir project that you want to formally verify, either start using `coq-of-noir` or contact us!_
34+
_If you have a Noir project that you want to formally verify, either start using `rocq-of-noir` or contact us!_
3435

3536
## 📚 Blog posts
3637

@@ -41,4 +42,4 @@ Here are some blog posts featuring this tool:
4142

4243
## ⚖️ License
4344

44-
`coq-of-noir` is free and **open source**. It is distributed under a dual license. (MIT/APACHE) The translation phase is based on the code of the Noir compiler to maximize code reuse.
45+
`rocq-of-noir` is free and **open source**. It is distributed under a dual license. (MIT/APACHE) The translation phase is based on the code of the Noir compiler to maximize code reuse.
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
-R . CoqOfNoir
1+
-R . RocqOfNoir
22
-arg -impredicative-set
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Require Import CoqOfNoir.CoqOfNoir.
1+
Require Import RocqOfNoir.RocqOfNoir.
22

33
(*
44
fn encode_and_decode$f0() -> () {
File renamed without changes.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Require Import CoqOfNoir.CoqOfNoir.
2-
Require Import simulation.CoqOfNoir.
1+
Require Import RocqOfNoir.RocqOfNoir.
2+
Require Import simulation.RocqOfNoir.
33
Require Import base64.monomorphic.
44

55
(** This module provides helpers to show the equality to debug [reflexivity] when it is too long or

0 commit comments

Comments
 (0)