pub struct Provenance {
pub pir: PirGraph,
pub leaf_probs: BTreeMap<LeafId, f64>,
pub choice_probs: BTreeMap<ChoiceVarId, (f64, f64)>,
pub queries: Vec<GroundAtom>,
pub evidence: Vec<(GroundAtom, bool)>,
pub leaf_atoms: BTreeMap<LeafId, GroundAtom>,
pub choice_sources: BTreeMap<ChoiceVarId, ChoiceSource>,
pub aggregate_lifting: Vec<AggregateLiftReport>,
/* private fields */
}Expand description
Provenance extraction result: PIR graph plus per-tuple formulas and weight metadata.
Fields§
§pir: PirGraph§leaf_probs: BTreeMap<LeafId, f64>§choice_probs: BTreeMap<ChoiceVarId, (f64, f64)>§queries: Vec<GroundAtom>§evidence: Vec<(GroundAtom, bool)>§leaf_atoms: BTreeMap<LeafId, GroundAtom>§choice_sources: BTreeMap<ChoiceVarId, ChoiceSource>§aggregate_lifting: Vec<AggregateLiftReport>Implementations§
Source§impl Provenance
impl Provenance
pub fn query_formula( &self, predicate: &str, args: &[Value], ) -> Option<PirNodeId>
pub fn leaf_atom(&self, leaf: LeafId) -> Option<&GroundAtom>
pub fn choice_source(&self, var: ChoiceVarId) -> Option<&ChoiceSource>
pub fn atoms_with_formulas( &self, ) -> impl Iterator<Item = (&GroundAtom, PirNodeId)> + '_
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Provenance
impl RefUnwindSafe for Provenance
impl Send for Provenance
impl Sync for Provenance
impl Unpin for Provenance
impl UnsafeUnpin for Provenance
impl UnwindSafe for Provenance
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more