![]() |
ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
Per-evaluation circuit state threaded to a method's evaluate(). More...

Public Member Functions | |
| void | ensureMultivaluedRewritten () |
| void | ensureDnfShape () const |
| void | ensureTreewidthProxy () const |
| double | featureCost (Feature f) const |
Heuristic acquisition cost of f, in the same work units as a method's estimatedCost (so the chooser can compare "run this method" against "acquire this feature"). | |
| bool | hasFeature (Feature f) const |
| void | acquireFeature (Feature f) |
Public Attributes | |
| GenericCircuit * | gc |
| gate_t | gc_root |
| pg_uuid_t | token |
| BooleanCircuit & | c |
| gate_t | gate |
| std::unordered_map< gate_t, gate_t > * | gc_to_bc |
| bool | inv_free_cert |
| const std::string & | args |
| bool | explicitly_named |
| invoked via byName (vs the default chain) | |
| size_t | n_inputs = 0 |
| input count N (O(1) cost feature) | |
| size_t | circuit_size = 0 |
| gate count S, the circuit-size parameter (O(1)) | |
| double | cost_budget = std::numeric_limits<double>::infinity() |
| Speculative-execution budget: the estimated cost (in the chooser's ms-ish units) of the next-cheapest admissible method. | |
| double | outside_cost = std::numeric_limits<double>::infinity() |
| Cost of an evaluation outside this Boolean view (sampling the equation systems of a recursion directly): the chooser gives up, throwing, rather than run a method or acquire a feature dearer than it. | |
| bool | multivalued_rewritten = false |
| std::string | actual_method |
| bool | linked_group = false |
| bool | fold_component = false |
| bool | dnf_computed_ = false |
| bool | dnf_ok_ = false |
| std::size_t | dnf_num_clauses_ = 0 |
| bool | tw_computed_ = false |
| unsigned | tw_proxy_ = 0 |
| double | dtree_cost_floor_ = 0. |
| Lower bound on the d-tree's cost, raised each time it overruns a budget. | |
| double | treedec_cost_floor_ = 0. |
| Lower bound on tree-decomposition's cost, raised when the parts it builds (islands, folded groups, residual) overrun a budget together. | |
| double | treedec_spent_ = 0. |
| Cost of the parts tree-decomposition has built in the current attempt. | |
| double | compilation_cost_floor_ = 0. |
| Lower bound on compilation's cost, raised when the external compiler is stopped for running past its time limit. | |
| double | compilation_spent_ms_ = 0. |
| Time, in ms, the external compiler has run in the current attempt. | |
| unsigned | tw_max_degree_ = 0 |
Per-evaluation circuit state threaded to a method's evaluate().
The Boolean view c is built once in probability_evaluate_internal; methods that need the multivalued rewrite trigger it (idempotently) through this context, so the rewrite fires exactly for the methods that need it.
Definition at line 898 of file probability_evaluate.cpp.
|
inline |
|
inline |
Definition at line 946 of file probability_evaluate.cpp.

|
inline |
Definition at line 931 of file probability_evaluate.cpp.

|
inline |
Definition at line 972 of file probability_evaluate.cpp.


|
inline |
Heuristic acquisition cost of f, in the same work units as a method's estimatedCost (so the chooser can compare "run this method" against "acquire this feature").
Definition at line 986 of file probability_evaluate.cpp.
|
inline |
Definition at line 996 of file probability_evaluate.cpp.
| std::string provsql::EvalContext::actual_method |
Definition at line 927 of file probability_evaluate.cpp.
| const std::string& provsql::EvalContext::args |
Definition at line 910 of file probability_evaluate.cpp.
| BooleanCircuit& provsql::EvalContext::c |
Definition at line 906 of file probability_evaluate.cpp.
| size_t provsql::EvalContext::circuit_size = 0 |
gate count S, the circuit-size parameter (O(1))
Definition at line 913 of file probability_evaluate.cpp.
| double provsql::EvalContext::compilation_cost_floor_ = 0. |
Lower bound on compilation's cost, raised when the external compiler is stopped for running past its time limit.
Definition at line 967 of file probability_evaluate.cpp.
| double provsql::EvalContext::compilation_spent_ms_ = 0. |
Time, in ms, the external compiler has run in the current attempt.
Definition at line 969 of file probability_evaluate.cpp.
| double provsql::EvalContext::cost_budget = std::numeric_limits<double>::infinity() |
Speculative-execution budget: the estimated cost (in the chooser's ms-ish units) of the next-cheapest admissible method.
A budget-aware method (the d-tree, tree-decomposition) stops once its own work would exceed this and throws MethodRepricedException, so the chooser re-ranks it at a higher cost and tries the next method – keeping wasted work within a constant factor of what the method finally spends. Infinity = no budget (the method is the last resort, or budgeting is off).
Definition at line 921 of file probability_evaluate.cpp.
|
mutable |
Definition at line 942 of file probability_evaluate.cpp.
|
mutable |
Definition at line 944 of file probability_evaluate.cpp.
|
mutable |
Definition at line 943 of file probability_evaluate.cpp.
| double provsql::EvalContext::dtree_cost_floor_ = 0. |
Lower bound on the d-tree's cost, raised each time it overruns a budget.
Definition at line 959 of file probability_evaluate.cpp.
| bool provsql::EvalContext::explicitly_named |
invoked via byName (vs the default chain)
Definition at line 911 of file probability_evaluate.cpp.
| bool provsql::EvalContext::fold_component = false |
Definition at line 929 of file probability_evaluate.cpp.
| gate_t provsql::EvalContext::gate |
Definition at line 907 of file probability_evaluate.cpp.
| GenericCircuit* provsql::EvalContext::gc |
Definition at line 903 of file probability_evaluate.cpp.
| gate_t provsql::EvalContext::gc_root |
Definition at line 904 of file probability_evaluate.cpp.
Definition at line 908 of file probability_evaluate.cpp.
| bool provsql::EvalContext::inv_free_cert |
Definition at line 909 of file probability_evaluate.cpp.
| bool provsql::EvalContext::linked_group = false |
Definition at line 928 of file probability_evaluate.cpp.
| bool provsql::EvalContext::multivalued_rewritten = false |
Definition at line 926 of file probability_evaluate.cpp.
| size_t provsql::EvalContext::n_inputs = 0 |
input count N (O(1) cost feature)
Definition at line 912 of file probability_evaluate.cpp.
| double provsql::EvalContext::outside_cost = std::numeric_limits<double>::infinity() |
Cost of an evaluation outside this Boolean view (sampling the equation systems of a recursion directly): the chooser gives up, throwing, rather than run a method or acquire a feature dearer than it.
Infinity = none.
Definition at line 925 of file probability_evaluate.cpp.
| pg_uuid_t provsql::EvalContext::token |
Definition at line 905 of file probability_evaluate.cpp.
| double provsql::EvalContext::treedec_cost_floor_ = 0. |
Lower bound on tree-decomposition's cost, raised when the parts it builds (islands, folded groups, residual) overrun a budget together.
Definition at line 962 of file probability_evaluate.cpp.
| double provsql::EvalContext::treedec_spent_ = 0. |
Cost of the parts tree-decomposition has built in the current attempt.
Definition at line 964 of file probability_evaluate.cpp.
|
mutable |
Definition at line 956 of file probability_evaluate.cpp.
|
mutable |
Definition at line 970 of file probability_evaluate.cpp.
|
mutable |
Definition at line 957 of file probability_evaluate.cpp.