![]() |
ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
Tree decomposition of a Boolean circuit for knowledge compilation. More...
#include <iostream>#include <string>#include <type_traits>#include <vector>#include <boost/container/static_vector.hpp>#include "flat_set.hpp"#include "BooleanCircuit.h"

Go to the source code of this file.
Classes | |
| class | TreeDecomposition |
| Tree decomposition of a Boolean circuit's primal graph. More... | |
| class | TreeDecompositionException |
| Exception thrown when a tree decomposition cannot be constructed. More... | |
Enumerations | |
| enum class | bag_t : size_t |
| Strongly-typed bag identifier for a tree decomposition. More... | |
Functions | |
| std::istream & | operator>> (std::istream &in, TreeDecomposition &td) |
| Read a tree decomposition in PACE challenge format. | |
| bag_t & | operator++ (bag_t &b) |
Pre-increment operator for bag_t. | |
| bag_t | operator++ (bag_t &b, int) |
Post-increment operator for bag_t. | |
| bool | operator< (bag_t t, std::vector< bag_t >::size_type u) |
Compare a bag_t against a std::vector size type. | |
| std::string | to_string (bag_t b) |
Convert a bag_t to its decimal string representation. | |
| std::istream & | operator>> (std::istream &i, bag_t &b) |
Read a bag_t from an input stream. | |
Tree decomposition of a Boolean circuit for knowledge compilation.
A tree decomposition of a graph \(G=(V,E)\) is a tree \(T\) whose nodes are labelled with bags (subsets of \(V\)) such that:
The treewidth is one less than the maximum bag size. ProvSQL builds a tree decomposition of the primal graph of a BooleanCircuit (using the min-fill elimination heuristic via PermutationStrategy) and then feeds it to dDNNFTreeDecompositionBuilder to construct a d-DNNF. Tractable compilation is guaranteed when the treewidth is bounded (empirically ≤ MAX_TREEWIDTH).
The decomposition can also be read from an external file in the standard PACE challenge format (via the streaming operator>>).
bag_t is a strongly-typed wrapper around size_t, analogous to gate_t, used as a bag identifier within the tree.
Definition in file TreeDecomposition.h.
|
strong |
Strongly-typed bag identifier for a tree decomposition.
Wraps a size_t, analogous to gate_t.
Definition at line 46 of file TreeDecomposition.h.
Pre-increment operator for bag_t.
| b | Bag to increment. |
Definition at line 234 of file TreeDecomposition.h.
Post-increment operator for bag_t.
| b | Bag to increment. |
b before the increment. Definition at line 242 of file TreeDecomposition.h.
Compare a bag_t against a std::vector size type.
| t | Bag identifier. |
| u | Size to compare against. |
true if the underlying integer of t is less than u. Definition at line 254 of file TreeDecomposition.h.
|
inline |
Read a bag_t from an input stream.
| i | Input stream. |
| b | Bag to populate. |
i. Definition at line 274 of file TreeDecomposition.h.
| std::istream & operator>> | ( | std::istream & | in, |
| TreeDecomposition & | td | ||
| ) |
Read a tree decomposition in PACE challenge format.
| in | Input stream. |
| td | Tree decomposition to populate. |
in. Definition at line 217 of file TreeDecomposition.cpp.
|
inline |
Convert a bag_t to its decimal string representation.
| b | Bag identifier. |
Definition at line 264 of file TreeDecomposition.h.
