ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
Loading...
Searching...
No Matches
MMappedCircuit.h File Reference

Persistent, mmap-backed storage for the full provenance circuit. More...

#include "GenericCircuit.h"
#include "MMappedUUIDHashTable.h"
#include "MMappedVector.hpp"
#include "provsql_utils.h"
Include dependency graph for MMappedCircuit.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  GateInformation
 Per-gate metadata stored in the gates MMappedVector. More...
 
class  MMappedCircuit
 Persistent mmap-backed representation of the provenance circuit. More...
 

Functions

GenericCircuit createGenericCircuit (pg_uuid_t token)
 Build an in-memory GenericCircuit rooted at token.
 

Detailed Description

Persistent, mmap-backed storage for the full provenance circuit.

MMappedCircuit is the authoritative store for all provenance circuit data that must survive transaction boundaries and be accessible across multiple PostgreSQL backends. It composes three MMappedVector instances plus one MMappedUUIDHashTable:

Component Contents
mapping UUID → gate index (hash table)
gates GateInformation records, one per gate
wires Flattened child-UUID lists for all gates
extra Variable-length string data (e.g. provenance labels)

All four backing files live in the PostgreSQL data directory and are opened/created by the ProvSQL background worker at startup.

The free-function createGenericCircuit() traverses the mmap data starting from a given root UUID to construct an in-memory GenericCircuit for evaluation.

Definition in file MMappedCircuit.h.

Function Documentation

◆ createGenericCircuit()

GenericCircuit createGenericCircuit ( pg_uuid_t  token)

Build an in-memory GenericCircuit rooted at token.

Performs a depth-first traversal of the mmap-backed circuit starting from token and copies all reachable gates and wires into a newly constructed GenericCircuit.

Parameters
tokenUUID of the root gate.
Returns
An in-memory GenericCircuit containing the sub-circuit.

Definition at line 349 of file MMappedCircuit.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: