|
pulsatrix
|
Semiring-parameterized bottom-up fixpoint evaluation – the weighted counterparts of Mission 0's naive_evaluate/semi_naive_evaluate. Phase 3 Mission 1 of campaign_exai_dl_library_neuro_symbolic (Generic Provenance-Semiring Abstraction).
More...
#include <vector>#include "pulsatrix/datalog_dual_semiring.hpp"#include "pulsatrix/datalog_rule.hpp"#include "pulsatrix/datalog_semiring.hpp"#include "pulsatrix/datalog_weighted_fact_database.hpp"
Go to the source code of this file.
Namespaces | |
| namespace | pulsatrix |
| namespace | pulsatrix::datalog |
Functions | |
| template<typename Semiring > | |
| WeightedFactDatabase< typename Semiring::Value > | pulsatrix::datalog::naive_evaluate_weighted (const std::vector< Rule > &rules, const WeightedFactDatabase< typename Semiring::Value > &initial_facts) |
Naive bottom-up fixpoint evaluation, generalized over any Semiring-shaped Semiring (see datalog_semiring.hpp): each round, every rule/substitution combination is matched against the entire current weighted fact set, and every derivation's weight (the ⊗-product of the weights of the facts it matched) is combined via ⊕ with every other derivation of the same head atom found in that same round. The atom's stored weight is then replaced with that round's freshly recomputed total (never added to the previous round's total) – see Stage 3 design decision 2 below for why replace-with-a-fresh-full-recompute, not incremental accumulate-across-rounds, is the correct generalization. | |
| template<typename Semiring > | |
| WeightedFactDatabase< typename Semiring::Value > | pulsatrix::datalog::semi_naive_evaluate_weighted (const std::vector< Rule > &rules, const WeightedFactDatabase< typename Semiring::Value > &initial_facts) |
The semi-naive-named weighted counterpart of naive_evaluate_weighted. | |
| template WeightedFactDatabase< bool > | pulsatrix::datalog::naive_evaluate_weighted< BooleanSemiring > (const std::vector< Rule > &, const WeightedFactDatabase< bool > &) |
| template WeightedFactDatabase< double > | pulsatrix::datalog::naive_evaluate_weighted< RealSemiring< double > > (const std::vector< Rule > &, const WeightedFactDatabase< double > &) |
| template WeightedFactDatabase< bool > | pulsatrix::datalog::semi_naive_evaluate_weighted< BooleanSemiring > (const std::vector< Rule > &, const WeightedFactDatabase< bool > &) |
| template WeightedFactDatabase< double > | pulsatrix::datalog::semi_naive_evaluate_weighted< RealSemiring< double > > (const std::vector< Rule > &, const WeightedFactDatabase< double > &) |
| template WeightedFactDatabase< DualNumber< double > > | pulsatrix::datalog::naive_evaluate_weighted< DualSemiring< double > > (const std::vector< Rule > &, const WeightedFactDatabase< DualNumber< double > > &) |
| template WeightedFactDatabase< DualNumber< double > > | pulsatrix::datalog::semi_naive_evaluate_weighted< DualSemiring< double > > (const std::vector< Rule > &, const WeightedFactDatabase< DualNumber< double > > &) |
Semiring-parameterized bottom-up fixpoint evaluation – the weighted counterparts of Mission 0's naive_evaluate/semi_naive_evaluate. Phase 3 Mission 1 of campaign_exai_dl_library_neuro_symbolic (Generic Provenance-Semiring Abstraction).