43#ifndef UCQ_JOINT_COMPILER_H
44#define UCQ_JOINT_COMPILER_H
48#include <unordered_map>
67 std::vector<unsigned>
vars;
162 std::vector<unsigned long>
head;
173 const std::vector<unsigned> &head_vars,
gate_t
Strongly-typed gate identifier.
Phase A of the joint-width UCQ compiler: assemble the joint graph of the data and its correlation str...
Tree decomposition of a Boolean circuit for knowledge compilation.
The joint encoding of an instance: facts, world events, and the joint graph the screen and the DP run...
static constexpr int MAX_TREEWIDTH
Maximum supported treewidth.
Compiles a Boolean UCQ over a joint encoding into a certified d-D, along a tree decomposition of the ...
static constexpr std::size_t DEFAULT_MAX_STATES
Default bound on the number of DP states at a single node.
static AnswerCircuit compileAnswersOneDP(const JointEncoding &enc, const UCQ &ucq, const std::vector< unsigned > &head_vars, unsigned max_treewidth=TreeDecomposition::MAX_TREEWIDTH, std::size_t max_states=DEFAULT_MAX_STATES)
static Result compile(const JointEncoding &enc, const UCQ &ucq, unsigned max_treewidth=TreeDecomposition::MAX_TREEWIDTH, std::size_t max_states=DEFAULT_MAX_STATES)
Compile a Boolean UCQ over enc into a certified d-D.
A d-DNNF circuit supporting exact probabilistic and game-theoretic evaluation.
Decomposable Deterministic Negation Normal Form circuit.
One atom of a conjunctive query: a relation symbol applied to query variables.
std::vector< unsigned > vars
Query-variable indices, one per column.
unsigned relation_id
Dense id of the relation symbol.
One conjunctive query (a disjunct of the UCQ).
std::vector< Atom > atoms
The conjuncts.
unsigned n_vars
Number of query variables.
std::size_t max_states
Peak DP state count.
dDNNF dd
The shared certified d-D.
std::vector< AnswerRoot > answers
One root per discovered answer.
Per-answer evaluation by a single top-down DP (data-graph regime).
std::vector< unsigned long > head
Bound element value per head variable.
gate_t root
This answer's d-D root in dd.
A compiled UCQ: the d-D and its statistics.
Stats stats
Compilation statistics.
dDNNF dd
d-D whose root computes "the UCQ holds"; input gates carry the event tokens and probabilities.
Structural statistics of a compilation, for diagnostics and tests.
std::size_t nb_variables
Number of world variables (events).
unsigned joint_treewidth
Treewidth of the min-fill decomposition of the joint graph.
std::vector< unsigned > n_enumerating
Per-disjunct static count of enumerating variables.
std::size_t dd_size
Number of gates of the emitted d-D.
std::size_t max_states
Maximum number of DP states at any node.
unsigned data_treewidth_lb
Degeneracy lower bound of the data-only graph.
unsigned circuit_treewidth_lb
Degeneracy lower bound of the slice-only graph.
std::size_t nb_bags
Number of bags of the decomposition.
A union of conjunctive queries.
std::vector< CQ > disjuncts
The disjuncts (at least one).