17#include <unordered_map>
18#include <unordered_set>
64std::vector<std::string>
desc;
gate_t
Strongly-typed gate identifier.
Out-of-line template method implementations for Circuit<gateType>.
DotGate
Gate types for a DOT visualisation circuit.
@ PROJECT
Projection gate.
@ OMINUS
Semiring monus (⊖), full.
@ OMINUSL
Monus, left child only.
@ OMINUSR
Monus, right child only.
@ DELTA
δ-semiring operator
@ IN
Input (variable) gate.
@ UNDETERMINED
Placeholder gate not yet assigned a type.
@ OTIMES
Semiring times (⊗)
Generic template base class for provenance circuits.
std::string uuid
UUID type used in this circuit (always std::string).
virtual gate_t setGate(const uuid &u, gateType type)
Create or update the gate associated with UUID u.
Circuit specialisation for GraphViz DOT rendering.
virtual std::string toString(gate_t g) const override
Return a textual description of gate g for debugging.
gate_t addGate() override
Allocate a new gate with a default-initialised type.
std::set< gate_t > inputs
Input gate IDs (rendered as leaf nodes)
gate_t setGate(const uuid &u, DotGate type) override
Create or update the gate associated with UUID u.
std::string render() const
Render the entire circuit as a GraphViz DOT digraph string.
std::vector< std::string > desc
Per-gate label strings (indexed by gate ID)