Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::avm2::simulation::BitwiseEvent Struct Reference

Event emitted during bitwise operation simulation for trace generation. More...

#include <bitwise_event.hpp>

Public Types

using Key = std::tuple< BitwiseOperation, MemoryValue, MemoryValue >
 Key type for deduplication (operation, input_a, input_b).
 

Public Member Functions

Key get_key () const
 
bool operator== (const BitwiseEvent &other) const =default
 

Public Attributes

BitwiseOperation operation
 The bitwise operation (AND, OR, or XOR).
 
MemoryValue a = MemoryValue::from_tag(MemoryTag::FF, 0)
 Left operand (tagged memory value).
 
MemoryValue b = MemoryValue::from_tag(MemoryTag::FF, 0)
 Right operand (tagged memory value).
 
uint128_t res = 0
 Result of the operation. Defaults to 0 (used on error paths).
 

Detailed Description

Event emitted during bitwise operation simulation for trace generation.

Captures the inputs, operation type, and result of a bitwise AND/OR/XOR operation. Emitted on both success and error paths (on error, res defaults to 0). Consumed by BitwiseTraceBuilder::process() to populate the bitwise subtrace.

Definition at line 17 of file bitwise_event.hpp.

Member Typedef Documentation

◆ Key

Key type for deduplication (operation, input_a, input_b).

Definition at line 24 of file bitwise_event.hpp.

Member Function Documentation

◆ get_key()

Key bb::avm2::simulation::BitwiseEvent::get_key ( ) const
inline

Definition at line 25 of file bitwise_event.hpp.

◆ operator==()

bool bb::avm2::simulation::BitwiseEvent::operator== ( const BitwiseEvent other) const
default

Member Data Documentation

◆ a

MemoryValue bb::avm2::simulation::BitwiseEvent::a = MemoryValue::from_tag(MemoryTag::FF, 0)

Left operand (tagged memory value).

Definition at line 19 of file bitwise_event.hpp.

◆ b

MemoryValue bb::avm2::simulation::BitwiseEvent::b = MemoryValue::from_tag(MemoryTag::FF, 0)

Right operand (tagged memory value).

Definition at line 20 of file bitwise_event.hpp.

◆ operation

BitwiseOperation bb::avm2::simulation::BitwiseEvent::operation

The bitwise operation (AND, OR, or XOR).

Definition at line 18 of file bitwise_event.hpp.

◆ res

uint128_t bb::avm2::simulation::BitwiseEvent::res = 0

Result of the operation. Defaults to 0 (used on error paths).

Definition at line 21 of file bitwise_event.hpp.


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