Fixpoint3.Ast.Ram
Type Aliases
FactsTuple consists of (oldFacts, newFacts), where oldFacts are given through
joining a model, while newFacts are EDB facts written in the Datalog program.
The extensible database (EDB) of a program.
The indexes to be created during program evaluation and their positions in memory.
Maps a RelSym and its place in Indexes[RelSym] to its final position in memory.
Maps to the set of Search for a RelSym in the Datalog program. It represents
the indexes that will be created for RelSym during program evaluation.
Contains a list of RelSym representing the names of the relations in the program,
a list of Full RelSym and 1 + the maximal identifier of the Full RelSyms.
A Search describes the order in which entries in a tuple are ordered. These are
created during the index selection phase and are used by indexes to store tuples
for efficient retrieval in range queries.
For example, the Datalog rule
A(x) :- B(x), C(_, _, x).
produces the search Vector#{2, 0, 1} for relation C. This means the tuples in
C are ordered by the third element, then the first and finally the second.
During the index selection phase, searches are collected and are expanded to
describe the order of the whole tuple, i.e., the above search is collected as
Vector#{2} but gets expanded to Vector#{2, 0, 1}. Thus, the final search used
by an index has length exactly equal to the relation's arity.
Definitions
Returns the arity of the non-lattice part of relSym.
Returns a RelSym wrapper of the predSym.
The returned RelSym is equivalent to a 'real' RelSym with respect
to the Order on RelSym.
Used for accessing values in maps.