Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
cdg Namespace Reference

Classes

struct  KeyEquals
 
struct  KeyHasher
 
class  StaticAnalyzer_
 

Typedefs

using UltraBlock = bb::UltraTraceBlock
 
using KeyPair = std::pair< uint32_t, size_t >
 
using StaticAnalyzer = StaticAnalyzer_< bb::fr >
 

Functions

std::pair< std::vector< uint32_t >, size_t > get_connected_component_with_index (const std::vector< std::vector< uint32_t > > &connected_components, size_t index)
 this method returns connected component with a given index and its size
 

Typedef Documentation

◆ KeyPair

using cdg::KeyPair = typedef std::pair<uint32_t, size_t>

We've added a new feature to the static analyzer that tracks which gates contain each variable. This is helpful for removing false-positive variables from the analyzer by using gate selectors combined with additional knowledge about variables (e.g., tau or range tags).

This information is stored in an unordered map with keys of type std::pair<uint32_t, size_t>, where:

  • uint32_t represents the real variable index
  • size_t represents the index of the UltraTraceBlock in the reference array of TraceBlocks contained within the Ultra Circuit Builder

Since std::unordered_map doesn't provide default hash and equality functions for std::pair keys, we've implemented these ourselves. Our approach is based on the hash_combine function from the Boost library, which efficiently combines hashes of the two elements in the pair.

Definition at line 28 of file graph.hpp.

◆ StaticAnalyzer

Definition at line 201 of file graph.hpp.

◆ UltraBlock

Definition at line 13 of file graph.hpp.

Function Documentation

◆ get_connected_component_with_index()

std::pair< std::vector< uint32_t >, size_t > cdg::get_connected_component_with_index ( const std::vector< std::vector< uint32_t > > &  connected_components,
size_t  index 
)

this method returns connected component with a given index and its size

Parameters
connected_componentsvector of all connected components
indexindex of required component
Returns
std::pair<std::vector<uint32_t>, size_t> pair of component and its size

Definition at line 1233 of file graph.cpp.