Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
acir_format::LogicConstraint Struct Reference

Logic constraint representation in ACIR format. More...

#include <logic_constraint.hpp>

Public Member Functions

 MSGPACK_FIELDS (a, b, result, num_bits, is_xor_gate)
 

Public Attributes

WitnessOrConstant< fra
 
WitnessOrConstant< frb
 
uint32_t result
 
uint32_t num_bits
 
bool is_xor_gate
 

Friends

bool operator== (LogicConstraint const &lhs, LogicConstraint const &rhs)=default
 

Detailed Description

Logic constraint representation in ACIR format.

The logic constraint enforces that:

  1. The inputs a and b fit into num_bits bits.
  2. That the result is the bitwise AND or XOR of a and b, depending on the is_xor_gate flag.

NOTE: num_bits must be <= MAX_NO_WRAP_INTEGER_BIT_LENGTH (252)

Definition at line 27 of file logic_constraint.hpp.

Member Function Documentation

◆ MSGPACK_FIELDS()

acir_format::LogicConstraint::MSGPACK_FIELDS ( a  ,
b  ,
result  ,
num_bits  ,
is_xor_gate   
)

Friends And Related Symbol Documentation

◆ operator==

bool operator== ( LogicConstraint const &  lhs,
LogicConstraint const &  rhs 
)
friend

Member Data Documentation

◆ a

WitnessOrConstant<fr> acir_format::LogicConstraint::a

Definition at line 28 of file logic_constraint.hpp.

◆ b

WitnessOrConstant<fr> acir_format::LogicConstraint::b

Definition at line 29 of file logic_constraint.hpp.

◆ is_xor_gate

bool acir_format::LogicConstraint::is_xor_gate

Definition at line 32 of file logic_constraint.hpp.

◆ num_bits

uint32_t acir_format::LogicConstraint::num_bits

Definition at line 31 of file logic_constraint.hpp.

◆ result

uint32_t acir_format::LogicConstraint::result

Definition at line 30 of file logic_constraint.hpp.


The documentation for this struct was generated from the following file: