Skip to main content

Module path

Module path 

Source
Expand description

Relational evaluation of the path algebra ⟦π⟧^G (doc 00 §2, Table 1).

Two mutually-recursive functions implement the relation by following it forward (succ) or backward (pred); Inverse simply swaps between them. This is the naive reference evaluation — correctness over speed.

Both are generic over a PathBackend: the leaf Path::Pred arms dispatch through the trait’s two adjacency lookups, so the same evaluator runs over a linear oxrdf::Graph (inference’s growing graph) or the dictionary-encoded FrozenIndexedDataset (the report and algebra validation paths). Every other arm (Id/Seq/Alt/Star/Inverse) is pure combinator logic and is backend-agnostic.

Traits§

PathBackend
Storage backend for path evaluation. Exposes the three adjacency primitives succ/pred/sh:closed need, so path evaluation can dispatch to either a linear oxrdf::Graph or the indexed FrozenIndexedDataset.

Functions§

node_of
A term usable in subject position, if it is not a literal.
pred
{ u | (u, node) ∈ ⟦path⟧ } — nodes that reach node.
succ
{ u | (node, u) ∈ ⟦path⟧ } — nodes reachable forward from node.
term_of