16int main(
int argc,
char* argv[])
21 std::cerr <<
"Usage: acir_components_check <bytecode_path>\n";
26 auto parsed_program = acir_format::deserialize_msgpack_compact<Acir::ProgramWithoutBrillig>(
30 o.convert(program_without_brillig);
31 }
catch (
const msgpack::type_error&) {
33 bb::assert_failure(
"acir_components_check: failed to convert msgpack data to ProgramWithoutBrillig");
35 return program_without_brillig;
38 parsed_program.functions.size(), 1U,
"acir_components_check: expected single function in ACIR program");
40 const auto& circuit = parsed_program.functions[0];
44 auto builder = acir_format::create_circuit<CircuitBuilder>(program);
47 auto errors = checker.
check();
49 for (
const auto& err : errors) {
53 return errors.empty() ? 0 : 1;
#define BB_ASSERT_EQ(actual, expected,...)
Structural comparison between ACIR-level and circuit-level connected components.
std::vector< Error > check()
Run the full check. Returns list of errors (empty = pass).
TranslatorCircuitBuilder creates a circuit that evaluates the correctness of the evaluation of EccOpQ...
std::vector< uint8_t > bytecode
std::vector< uint8_t > get_bytecode(const std::string &bytecodePath)
void assert_failure(std::string const &err)
UltraCircuitBuilder_< UltraExecutionTraceBlocks > UltraCircuitBuilder
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept