Barretenberg
The ZK-SNARK library at the core of Aztec
|
Class for loading ACIR (Arithmetic Circuit Intermediate Representation) programs and converting them to SMT format. More...
#include <acir_loader.hpp>
Public Member Functions | |
AcirToSmtLoader ()=delete | |
AcirToSmtLoader (const AcirToSmtLoader &other)=delete | |
AcirToSmtLoader (AcirToSmtLoader &&other)=delete | |
AcirToSmtLoader & | operator= (const AcirToSmtLoader other)=delete |
AcirToSmtLoader && | operator= (AcirToSmtLoader &&other)=delete |
~AcirToSmtLoader ()=default | |
AcirToSmtLoader (std::string filename) | |
Constructs loader from an ACIR program file. | |
acir_format::AcirFormat & | get_constraint_systems () |
Gets the constraint systems from the loaded ACIR program. | |
bb::UltraCircuitBuilder | get_circuit_builder () |
Creates a circuit builder for the loaded program. | |
smt_solver::Solver | get_smt_solver () |
Gets an SMT solver instance. | |
smt_circuit::UltraCircuit | get_bitvec_smt_circuit (smt_solver::Solver *solver) |
Creates an SMT circuit for bitvector operations. | |
smt_circuit::UltraCircuit | get_field_smt_circuit (smt_solver::Solver *solver) |
Creates an SMT circuit for field operations. | |
smt_circuit::UltraCircuit | get_integer_smt_circuit (smt_solver::Solver *solver) |
Creates an SMT circuit for integer operations. | |
smt_circuit::CircuitSchema | get_circuit_schema () |
Gets the circuit schema from the loaded ACIR program. | |
Private Attributes | |
std::string | instruction_name |
Name of the instruction/filename being processed. | |
std::vector< uint8_t > | acir_program_buf |
Buffer containing the raw ACIR program data read from file. | |
acir_format::AcirFormat | constraint_system |
The parsed constraint system from the ACIR program. | |
msgpack::sbuffer | circuit_buf |
Buffer for circuit serialization using MessagePack. | |
Class for loading ACIR (Arithmetic Circuit Intermediate Representation) programs and converting them to SMT format.
This class handles loading ACIR programs from files and provides functionality to:
The loader reads an ACIR program file, creates constraint systems, and allows conversion to different SMT circuit types (bitvector, field, integer) for formal verification.
Definition at line 21 of file acir_loader.hpp.
|
delete |
|
delete |
|
delete |
|
default |
AcirToSmtLoader::AcirToSmtLoader | ( | std::string | filename | ) |
Constructs loader from an ACIR program file.
filename | Path to the ACIR program file to load |
Reads the ACIR program from file, initializes the constraint system, and prepares the circuit buffer for later use.
Definition at line 29 of file acir_loader.cpp.
smt_circuit::UltraCircuit AcirToSmtLoader::get_bitvec_smt_circuit | ( | smt_solver::Solver * | solver | ) |
Creates an SMT circuit for bitvector operations.
solver | Pointer to SMT solver to use |
Definition at line 59 of file acir_loader.cpp.
bb::UltraCircuitBuilder AcirToSmtLoader::get_circuit_builder | ( | ) |
Creates a circuit builder for the loaded program.
Creates and returns a circuit builder with predefined variable names:
Definition at line 37 of file acir_loader.cpp.
smt_circuit::CircuitSchema AcirToSmtLoader::get_circuit_schema | ( | ) |
Gets the circuit schema from the loaded ACIR program.
Definition at line 54 of file acir_loader.cpp.
|
inline |
Gets the constraint systems from the loaded ACIR program.
Definition at line 45 of file acir_loader.hpp.
smt_circuit::UltraCircuit AcirToSmtLoader::get_field_smt_circuit | ( | smt_solver::Solver * | solver | ) |
Creates an SMT circuit for field operations.
solver | Pointer to SMT solver to use |
Definition at line 65 of file acir_loader.cpp.
smt_circuit::UltraCircuit AcirToSmtLoader::get_integer_smt_circuit | ( | smt_solver::Solver * | solver | ) |
Creates an SMT circuit for integer operations.
solver | Pointer to SMT solver to use |
Definition at line 71 of file acir_loader.cpp.
smt_solver::Solver AcirToSmtLoader::get_smt_solver | ( | ) |
Gets an SMT solver instance.
Creates a solver configured with:
Definition at line 46 of file acir_loader.cpp.
|
delete |
|
delete |
|
private |
Buffer containing the raw ACIR program data read from file.
Definition at line 99 of file acir_loader.hpp.
|
private |
Buffer for circuit serialization using MessagePack.
Definition at line 101 of file acir_loader.hpp.
|
private |
The parsed constraint system from the ACIR program.
Definition at line 100 of file acir_loader.hpp.
|
private |
Name of the instruction/filename being processed.
Definition at line 98 of file acir_loader.hpp.