32#include "../BooleanCircuit.h"
71 std::set<gate_t> seen;
72 for (
const auto &h : vec) {
73 if(seen.find(h)!=seen.end())
87 std::set<gate_t> seen;
88 for (
const auto &h : vec) {
89 if(seen.find(h)!=seen.end())
@ OR
Boolean OR aggregate.
@ AND
Boolean AND aggregate.
BooleanGate
Gate types for a Boolean provenance circuit.
@ NOT
Logical negation of a single child gate.
@ OR
Logical disjunction of child gates.
@ AND
Logical conjunction of child gates.
gate_t
Strongly-typed gate identifier.
Abstract semiring interface for provenance evaluation.
Boolean circuit for provenance formula evaluation.
gate_t setGate(BooleanGate type) override
Allocate a new gate with type type and no UUID.
void addWire(gate_t f, gate_t t)
Add a directed wire from gate f (parent) to gate t (child).
Provenance-as-Boolean-circuit semiring.
BoolExpr(BooleanCircuit &bc)
Construct a BoolExpr semiring over the given circuit.
value_type plus(const std::vector< value_type > &vec) const override
Apply the additive operation to a list of values.
const gate_t ZERO
Pre-allocated zero gate (OR with no children)
value_type delta(value_type x) const override
Apply the operator.
value_type one() const override
Return the multiplicative identity .
virtual value_type monus(value_type x, value_type y) const override
Apply the monus (m-semiring difference) operation.
BooleanCircuit & c
The Boolean circuit being constructed.
value_type zero() const override
Return the additive identity .
const gate_t ONE
Pre-allocated one gate (AND with no children)
virtual bool absorptive() const override
Return true if this semiring is absorptive ( ).
value_type times(const std::vector< value_type > &vec) const override
Apply the multiplicative operation to a list of values.
Abstract base class for (m-)semirings.