ExecutableRam
ExecutableRam is a low level representation of the Datalog program to be executed.
This representation is tightly coupled to the current interpreter.
Enums
| BoolExp | `Not(b)`: True if `b` is false. |
| RamProgram | A `RamProgram` represents a further compiled Datalog program ready to be run by the interpreter. |
| RamStmt | `Insert(body)` executes the RelOp `body`. `body` is a `RelOp` which always ends with insertions. |
| RamTerm | Represents a Relational Algebra Machine (RAM) term. |
| RelOp | `Search(rvPos, indexPos, meet, den, writeTuple, body)` iterates the facts in the index at `indexPos` saving them at `rvPos` and using the facts as context for `writeTuple`. |
Type Aliases
ConstWrites describes constants used for queries and the position they should be
written to. Explicitly for (id1, id2, val) we have that
searchEnv[id1][id2] = val.
They come from rules with constants like Head(x):- Body(4, x). We would here
a ConstWrite of Vector#{(idOfBody, 0, 4)}.
The extensible database (EDB) of a program.
WriteTuple describes where variables that become bound for a context-specified RowVar
are used later. Explicitly for (indexInFrom, indexTo, indexInTo) we have that for
the context-specified RowVar, rv, write searchEnv[indexTo][indexInTo] = rv[indexInFrom].
They come from rules with variables like Head(x):- Body1(x), Body2(y, x), since x is used
twice. We would here have a WriteTuple of Vector#{(0, idOfBody2, 1)} for Body1.
This should be read as: The first value of Body1 should be saved as idOfBody2's
(the position of Body2) second value.