pub struct LocyIncomplete {
pub reason: LocyIncompleteReason,
pub elapsed_ms: u64,
pub limit_ms: u64,
pub max_iterations: usize,
pub completed_strata: usize,
pub total_strata: usize,
pub incomplete_rules: Vec<String>,
pub skipped_rules: Vec<String>,
pub complement_rules_affected: Vec<String>,
}Expand description
Diagnostics describing a Locy evaluation that stopped before completing.
Returned (boxed) inside UniError::LocyIncomplete when a program exceeds
its time or iteration budget, and also attached to a LocyResult when the
caller opts into partial results. The rule lists exist so a caller can tell
“not evaluated” apart from “genuinely empty”: any rule named in
incomplete_rules or skipped_rules may be missing facts purely because
evaluation was cut short, so a zero-row count for it is not authoritative.
§Examples
use uni_common::{LocyIncomplete, LocyIncompleteReason};
let detail = LocyIncomplete {
reason: LocyIncompleteReason::Timeout,
elapsed_ms: 305_000,
limit_ms: 300_000,
max_iterations: 1000,
completed_strata: 2,
total_strata: 4,
incomplete_rules: vec!["upstream_reaches".into()],
skipped_rules: vec!["healthy_assets".into()],
complement_rules_affected: vec!["healthy_assets".into()],
};
assert!(detail.to_string().contains("timeout"));
assert!(detail.to_string().contains("UNSOUND"));Fields§
§reason: LocyIncompleteReasonWhy evaluation stopped.
elapsed_ms: u64Wall-clock time elapsed when evaluation was cut short, in milliseconds.
limit_ms: u64The configured wall-clock timeout, in milliseconds.
max_iterations: usizeThe configured max_iterations cap for recursive strata.
completed_strata: usizeNumber of strata fully evaluated before the cutoff.
total_strata: usizeTotal number of strata in the program.
incomplete_rules: Vec<String>Rules in the stratum that was interrupted mid-evaluation. Their facts may be a partial fixpoint rather than the least fixed point.
skipped_rules: Vec<String>Rules in strata that were never reached. They derived no facts solely because evaluation stopped first, not because their result is empty.
complement_rules_affected: Vec<String>Subset of the incomplete/skipped rules that use an IS NOT complement.
Stratified negation over a partial relation is unsound, so these results
must not be trusted at all — surfaced separately for emphasis.
Trait Implementations§
Source§impl Clone for LocyIncomplete
impl Clone for LocyIncomplete
Source§fn clone(&self) -> LocyIncomplete
fn clone(&self) -> LocyIncomplete
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LocyIncomplete
impl Debug for LocyIncomplete
Source§impl Display for LocyIncomplete
impl Display for LocyIncomplete
impl Eq for LocyIncomplete
Source§impl PartialEq for LocyIncomplete
impl PartialEq for LocyIncomplete
Source§fn eq(&self, other: &LocyIncomplete) -> bool
fn eq(&self, other: &LocyIncomplete) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for LocyIncomplete
Auto Trait Implementations§
impl Freeze for LocyIncomplete
impl RefUnwindSafe for LocyIncomplete
impl Send for LocyIncomplete
impl Sync for LocyIncomplete
impl Unpin for LocyIncomplete
impl UnsafeUnpin for LocyIncomplete
impl UnwindSafe for LocyIncomplete
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more