Fixpoint3.Ast.Ram
Type Aliases
type alias FactTuple = (Facts, Facts)
SourceFactsTuple consists of (oldFacts, newFacts), where oldFacts are given through
joining a model, while newFacts are EDB facts written in the Datalog program.
type alias Facts = Map[RelSym, BPlusTree[Vector[Boxed], Boxed, Static]]
SourceThe extensible database (EDB) of a program.
type alias IndexInformation = (Indexes, IndexPositions)
SourceThe indexes to be created during program evaluation and their positions in memory.
type alias IndexPositions = Map[(RelSym, Int32), Int32]
SourceMaps a RelSym and its place in Indexes[RelSym] to its final position in memory.
type alias Indexes = Map[RelSym, Vector[Search]]
SourceMaps 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.
type alias Predicates = (List[RelSym], List[RelSym], Int64)
SourceContains 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.
type alias Search = Vector[Int32]
SourceA 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
def arityOf(relSym: RelSym): Int32
SourceReturns the arity of relSym.
def arityOfNonLat(relSym: RelSym): Int32
SourceReturns the arity of the non-lattice part of relSym.
def makeFakeRelSym(predSym: PredSym): RelSym
SourceReturns 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.
def toDenotation(relSym: RelSym): BoxedDenotation
SourceReturns the denotation of relSym.
def toId(relSym: RelSym): Int64
SourceReturns the identifier of relSym.