#[non_exhaustive]pub enum XlogError {
Parse(String),
StratificationCycle(Vec<String>),
UnsafeVariable(String),
ResourceExhausted {
context: String,
estimated_bytes: u64,
budget_bytes: u64,
},
CompileCapacityExceeded {
context: String,
detail: String,
},
VerifyBudgetExceeded {
context: String,
detail: String,
},
Kernel(String),
Type(String),
Compilation(String),
UnsupportedEpistemicConstruct {
construct: String,
context: String,
},
Execution(String),
}Expand description
Primary error type for XLOG operations
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Parse(String)
Parse error from the Datalog frontend.
StratificationCycle(Vec<String>)
Stratification failed due to a cycle through negation.
UnsafeVariable(String)
A variable is not bound in any positive body literal (domain safety violation).
ResourceExhausted
GPU memory budget exceeded.
Fields
CompileCapacityExceeded
The D4 compile phase declined a CNF too large to compile safely (the knowledge-compilation emit buffers are fixed-capacity; a larger instance would overrun them and fail with a context-poisoning CUDA launch error). A typed, catchable decline distinct from the verify-phase signal — “too big to compile”, not “verify gave up”. The caller can skip the query or fall back to an approximate engine.
Fields
VerifyBudgetExceeded
The GPU CDCL equivalence verifier declined rather than risk a
CUDA launch failure that poisons the primary context: a per-verify
conflict budget ran out before the search reached a definite answer
(INDETERMINATE — declined fail-closed, never trusted as a proof).
Distinct from [CompileCapacityExceeded] so the two phases stay
diagnosably separate. The caller can skip the query or fall back to an
approximate engine.
Fields
Kernel(String)
GPU kernel launch or execution error.
Type(String)
Type checking or inference error.
Compilation(String)
Compilation pipeline error.
UnsupportedEpistemicConstruct
Epistemic construct is known to the frontend but unsupported in this context.
Fields
Execution(String)
Runtime execution error.
Implementations§
Source§impl XlogError
impl XlogError
Sourcepub fn kernel_ctx(op: &str, detail: &str, source: &impl Display) -> Self
pub fn kernel_ctx(op: &str, detail: &str, source: &impl Display) -> Self
Create a Kernel error with structured context: “op: detail: source”.
Sourcepub fn execution_ctx(op: &str, detail: &str, source: &impl Display) -> Self
pub fn execution_ctx(op: &str, detail: &str, source: &impl Display) -> Self
Create an Execution error with structured context.
Sourcepub fn compilation_ctx(op: &str, detail: &str, source: &impl Display) -> Self
pub fn compilation_ctx(op: &str, detail: &str, source: &impl Display) -> Self
Create a Compilation error with structured context.
Trait Implementations§
Source§impl Error for XlogError
impl Error for XlogError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()