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

Template implementation of GenericCircuit::evaluate(). More...

#include "GenericCircuit.h"
#include "utils/lsyscache.h"
Include dependency graph for GenericCircuit.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Detailed Description

Template implementation of GenericCircuit::evaluate().

Provides the out-of-line definition of the evaluate() template method declared in GenericCircuit.h. This file must be included (directly or transitively) by any translation unit that instantiates GenericCircuit::evaluate<S>() for a specific semiring type S.

The evaluate() method performs a post-order traversal of the sub-circuit rooted at gate g, looking up input-gate values from provenance_mapping and combining them using the semiring operations:

Gate type Semiring operation
gate_input lookup in provenance_mapping
gate_plus semiring.plus(children)
gate_times semiring.times(children)
gate_monus semiring.monus(left, right)
gate_delta semiring.delta(child)
gate_cmp semiring.cmp(left, op, right)
gate_semimod semiring.semimod(x, s)
gate_agg semiring.agg(op, children)
gate_value semiring.value(string)
gate_one semiring.one()
gate_zero semiring.zero()

Definition in file GenericCircuit.hpp.