Open bragaigor opened 1 year ago
This are the steps to install CVC5 on MacOS (probably transferable to Linux). Instructions taken from: https://github.com/cvc5/cvc5/blob/main/INSTALL.rst
git clone https://github.com/cvc5/cvc5
You can also download the source code from https://github.com/cvc5/cvc5/releases/tag/cvc5-1.0.5 but using the repo is recommended.
./configure.sh —cocoa —auto-download
cd build
make -j4
make check
sudo make install
Python 3.9 (you might need to install pip or update it):
brew install python@3.9
python3.9 -m pip install toml
python3.9 -m pip install pyparsing
Java. Go to the following link and install the latest Java https://www.oracle.com/java/technologies/downloads/
Necessary for cocoa
brew install gmp
brew install libpgm
Now that you have gmp
installed you need to tell CVC5 where to find it. The easiest way is through an env variable. If you install gap via homebrew, the path will look something like the following
export GMP_LIB=/opt/homebrew/Cellar/gmp/6.2.1_1/lib/libgmp.a
If you’re having trouble finding it you can search for it with:
find /usr /opt -name "libgmp.a"
We won't do CI/CD -- I don't anticipate a lot of active development
research-zk-fm/halo2
repo but I would recommend adding eye-catchers if you haven't done so already. Since this repo doesn't belong to us and I don't think you plan on maintaining it, I would include comments to the functions and structs that you have modified AKA eye-catchers. Even if it's as simple as anSerialize
orParialEq
, it will help you in the future in case you want to update Halo2 repo dependencies.[x] Remember that repeated code from before? It can be replaced with a macro that takes a variable number of arguments. I agree it's not obvious at first but I think it's more elegant :)
README.md
?cargo build --features benches
the compiler complains thatrun_benchmark
andrun_underconstrained_benchmark_for_specified_size
are not used. To make them go away and to actually have something that you can run the benchmark against without editing the code there's a few different ways.benchmarks
folder a lib or a bin, in which case it would makebenchmarks
it's own little rust "project". The approach probably requires more work but more elegant. You can checkout some examples in servus-proof (look atCargo.toml
) or at zkevm-circuits (look atCargo.toml
).korrekt/src/test/integration_tests.rs
.README.md
file and there's quite a few that failed. Is there any other prerequisites that I need to run before running the tests? If so I would include those in theREADME.md
file as well. If not, I would make sure all tests passes as people cloning this repo will definitely run them.And the above logic is exactly what the Trait
From
is used for. The above can be re-written with the following:That way, instead of calling
Analyzer::create_with_circuit(&circuit)
you callAnalyzer::from(&circuit)
which is a Rusty way of doing this kind of things. Then I would just deletecreate_with_circuit
all-togetheryou don't need to declare
let mut used = false;
inside the for loop, the following would be more sound:also where I marked above with
// <<<<<<<<<
is not doing anything so I would delete that lineprintln!
that would be more fit forlog::info!
orlog::err!
for things like:println!("There is no equivalent model with the same public input to prove model {} is under-constrained!", i);
. At least for me when I'm debating on what to useprintln!
orlog::info
I ask myself "is this prompting the user (println) or informing the user (log::info)? Also can the user live without it (log::debug)?"assign_table()
fromAnalyticLayouter
doesn't do anything? Maybe a//todo!
is missing? If not a comment whyassign_table()
doesn't need to do anything? Something similar to what you did withconstrain_constant()
.It seems to be
_annotation
? It just gives the reader a context of what param that refers to. Same forassign_fixed()
cvc5