Skip to main content

Crate kermit_algos

Crate kermit_algos 

Source
Expand description

Join algorithms for Kermit’s relational algebra engine.

Implements the Leapfrog Triejoin algorithm, which performs worst-case optimal multi-way joins over trie-structured relations. The algorithm is generic over any data structure that implements TrieIterable.

Structs§

JoinQuery
A parsed Datalog join query of the form Head :- Body1, Body2, ... .
LeapfrogTriejoin
Entry point for the Leapfrog Triejoin algorithm, implementing JoinAlgo for any TrieIterable data structure.
SingletonTrieIter
Unary trie iterator holding a single usize value.

Enums§

JoinAlgorithm
The available join algorithm implementations.
RewriteError
Error returned by rewrite_atoms when an atom does not match the expected c<digits> shape.
TrieIterKind
Either borrows a real relation or owns a synthetic singleton.

Traits§

JoinAlgo
The JoinAlgo trait is used as a base for join algorithms.

Functions§

rewrite_atoms
Rewrites query.body: each Term::Atom("c<id>") becomes a fresh variable K<i>, with a new unary predicate Const_c<id>(K<i>) appended to the body.

Type Aliases§

ConstSpec
Pairs a synthetic predicate name (e.g. "Const_c42") with its dictionary ID. One entry is produced per rewritten atom occurrence.