-
Notifications
You must be signed in to change notification settings - Fork 322
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Merge SMT Terms in one class (#5254)
This pr brings major changes in symbolic terms usage. ### STerm A new class that is merged from `FFTerm` and `FFITerm` classes. Now you can use `FFTerm` or `FFITerm` by providing a `TermType::FFTerm` or `TermType::FFITerm` to `STerm` constructor. All the operations are now stored in `unordered_map<OpType, cvc5::Kind> operations`. e.g. if the type is `FFTerm`, then `operations[OpType::ADD] = cvc5::Kind::FINITE_FIELD_ADD`, and `operations[OpType::ADD] = cvc5::Kind::ADD` for `FFITerm` Also now you can use new `BVTerm` type. It can be used to solve constraints with lots of bitwise operations. However, it can be used only once all the optimizations are added. You simply can't use it to simulate finite field operations and it's not really optimal. Symbolic variables can be initialized using new functions `FFVar`, `FFIVar` and `BVVar` ### Solver Added `bv_sort` member Added bitvector operations parser to `stringify_term` ### Circuit No more templates. All the circuit methods are moved to .cpp file Fixes: - range constraint is now made to be `<= 2^n - 1` instead of `< 2^n` - changed `xor_gate` to `logic_gate` in `info` function - Removed setting optimized variables to zero, since it didn't affect anything except polluted output - Restored public_variables initialization. It was deleted some time ago. I don't know why. ### Utils - `smt_timer` now has `bool mins` param, that tells in what format to output elapsed time --------- Co-authored-by: Innokentii Sennovskii <[email protected]>
- Loading branch information
Showing
21 changed files
with
1,829 additions
and
1,807 deletions.
There are no files selected for viewing
538 changes: 499 additions & 39 deletions
538
barretenberg/cpp/src/barretenberg/smt_verification/circuit/circuit.cpp
Large diffs are not rendered by default.
Oops, something went wrong.
557 changes: 22 additions & 535 deletions
557
barretenberg/cpp/src/barretenberg/smt_verification/circuit/circuit.hpp
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
231 changes: 0 additions & 231 deletions
231
barretenberg/cpp/src/barretenberg/smt_verification/smt_bigfield.test.cpp
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.