![]() |
ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
Symbolic provenance formula semiring over std::string.
More...
#include "Formula.h"


Public Member Functions | |
| virtual value_type | zero () const override |
| Return the additive identity \(\mathbb{0}\). | |
| virtual value_type | one () const override |
| Return the multiplicative identity \(\mathbb{1}\). | |
| virtual value_type | plus (const std::vector< value_type > &v) const override |
| Apply the additive operation to a list of values. | |
| virtual value_type | times (const std::vector< value_type > &v) const override |
| Apply the multiplicative operation to a list of values. | |
| virtual value_type | monus (value_type x, value_type y) const override |
| Apply the monus (m-semiring difference) operation. | |
| virtual value_type | delta (value_type x) const override |
| Apply the \(\delta\) operator. | |
| virtual value_type | cmp (value_type s1, ComparisonOperator op, value_type s2) const override |
| Evaluate a comparison gate. | |
| virtual value_type | semimod (value_type x, value_type s) const override |
| Apply a semimodule scalar multiplication. | |
| virtual value_type | agg (AggregationOperator op, const std::vector< std::string > &s) override |
| Evaluate an aggregation gate. | |
| virtual value_type | value (const std::string &s) const override |
| Interpret a literal string as a semiring value. | |
Public Member Functions inherited from semiring::Semiring< std::string > | |
| virtual | ~Semiring ()=default |
| virtual bool | absorptive () const |
Return true if this semiring is absorptive ( \(a \oplus a = a\)). | |
Additional Inherited Members | |
Public Types inherited from semiring::Semiring< std::string > | |
| typedef std::string | value_type |
| The carrier type of this semiring. | |
Symbolic provenance formula semiring over std::string.
Evaluates circuits to human-readable Unicode provenance formulas. Supports all optional operations (cmp, semimod, agg, value) in addition to the mandatory ones.
|
inlineoverridevirtual |
Evaluate an aggregation gate.
| op | The aggregation function (COUNT, SUM, MIN, …). |
| s | List of child semiring values to aggregate. |
| SemiringException | if not overridden. |
Reimplemented from semiring::Semiring< std::string >.
|
inlineoverridevirtual |
Evaluate a comparison gate.
| s1 | Left operand. |
| op | Comparison operator. |
| s2 | Right operand. |
| SemiringException | if not overridden. |
Reimplemented from semiring::Semiring< std::string >.
|
inlineoverridevirtual |
Apply the \(\delta\) operator.
| x | Input value. |
Implements semiring::Semiring< std::string >.
|
inlineoverridevirtual |
Apply the monus (m-semiring difference) operation.
| x | Minuend. |
| y | Subtrahend. |
Implements semiring::Semiring< std::string >.
|
inlineoverridevirtual |
Return the multiplicative identity \(\mathbb{1}\).
Implements semiring::Semiring< std::string >.
Definition at line 75 of file Formula.h.

|
inlineoverridevirtual |
Apply the additive operation to a list of values.
| v | Ordered list of operands (empty list should return zero()). |
Implements semiring::Semiring< std::string >.
Definition at line 78 of file Formula.h.

|
inlineoverridevirtual |
Apply a semimodule scalar multiplication.
| x | Provenance value. |
| s | Scalar value. |
| SemiringException | if not overridden. |
Reimplemented from semiring::Semiring< std::string >.
|
inlineoverridevirtual |
Apply the multiplicative operation to a list of values.
| v | Ordered list of operands (empty list should return one()). |
Implements semiring::Semiring< std::string >.
Definition at line 86 of file Formula.h.

|
inlineoverridevirtual |
Interpret a literal string as a semiring value.
Used for gate_value gates whose payload is a string.
| s | Literal string. |
| SemiringException | if not overridden. |
Reimplemented from semiring::Semiring< std::string >.
|
inlineoverridevirtual |
Return the additive identity \(\mathbb{0}\).
Implements semiring::Semiring< std::string >.
Definition at line 72 of file Formula.h.
