76 std::set<gate_t> seen;
77 for (
const auto &h : vec) {
78 if(seen.find(h)!=seen.end())
92 std::set<gate_t> seen;
93 for (
const auto &h : vec) {
94 if(seen.find(h)!=seen.end())
@ OR
Boolean OR aggregate.
@ AND
Boolean AND aggregate.
Boolean provenance circuit with support for knowledge compilation.
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.
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 .
virtual bool compatibleWithBooleanRewrite() const override
BoolExpr is the free Boolean-circuit construction; the evaluation map to Bool at any valuation is an ...
gate_t value_t
Carrier type: a gate ID in the target BooleanCircuit.
const gate_t ONE
Pre-allocated one gate (AND with no children).
virtual bool absorptive() const override
Return true if this semiring is absorptive ( for all ).
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.