The pipeline
Every program follows the same path. The host compiles and orchestrates; the executor dispatches CUDA kernels and manages relation state that stays resident on the device.Parse
A PEG grammar turns source into an abstract syntax tree. The grammar is the
definitive surface of the language: if a construct does not appear in it, it does
not parse.
Stratify
Strongly-connected-component analysis over the predicate dependency graph orders
the program into strata and rejects negation or aggregation that cannot be
stratified.
Lower
The stratified program is lowered to a relational IR (
RIR) of joins, filters,
projections, aggregations, and recursive fixpoints.Optimize
A cost-aware pass plans join order, pushes down predicates, and promotes eligible
joins to worst-case-optimal multiway joins.
Four paradigms, one frontend
After the shared parse and stratify stages, each reasoning path branches into its own intermediate representation, built from the normalized program rather than from the deterministicRIR.
| Paradigm | What it computes | Learn more |
|---|---|---|
| Deterministic Datalog | Least-model semantics with stratified negation and aggregation, evaluated as a semi-naive fixpoint | Language reference |
| Probabilistic | Marginal and conditional probabilities via exact knowledge compilation or Monte Carlo sampling | Probabilistic programming |
| Epistemic | World-view semantics over modal know and possible operators | Epistemic reasoning |
| Neural-symbolic | Learned rules and neural predicates trained end-to-end with PyTorch | Rule learning |
RIR); the probabilistic and solver paths compile further to a
GPU-evaluable circuit format (XGCF), while the epistemic path drives GPU world-view
execution directly.
Compile once, evaluate many
The compiled plan is structure, and structure is stable: across training iterations or repeated queries, only data and weights change, never the plan. XLOG compiles a program once and reuses the plan — and, for probabilistic inference, the compiled circuit — across evaluations. This is what makes XLOG usable inside a training loop rather than alongside it. Results stay on the GPU. Query outputs and gradient tensors are exposed through DLPack capsules and Arrow for zero-copy interop with PyTorch, JAX, and cuDF, so a downstream tensor computation reads XLOG’s output without a host round-trip.Why GPU residency matters
The defining constraint behind XLOG’s design — and what separates it from CPU logic
engines bolted onto a GPU tensor framework.