-
Notifications
You must be signed in to change notification settings - Fork 208
RAM Intermediate Representation
The relational algebra machine has its own representation.
RamNode is the basic unit that forms a RAM program.
Each RamNode has a Type attribute, indicate the Node types, used by the RamVisitor to defer the correct visitor method.
(Visitor Pattern is built by type-testing instead of v-table, see RamVisitor.h).
This class represents a conjunction of two RamCondition. True if both conditions are true. Support short circuit.
This class holds two RamExpression operands, has various logic operators ('<', '==', etc). This class represents a constraint condition, should be evaluated to true if the constraint holds between two operands.
This class holds a target relation, represents an emptiness check operation on the target relation.
RamNegation holds another RamCondition node, whose evaluation result will be negated by RamNegation.
Abstract class for existence check.
In addition to a target relation, it also has an array of RamExpression called values, which serves as a pattern. This classe represents a check operation on the target relation against the given pattern. Should be evaluated to true if any tuple in the target relation matches the pattern.
Similar to the RamExistenceCheck.
Represents an expression in RAM program.
Representing a unary / binary / ternary operation that applies to the arguments.
Represent a numeric value in RAM.
A pack operation. Pack the results arguments into a reference.
Subroutine arguments.
Evaluating this expression should increase the RAM's counter by one.
This class represents a select action. The element to be selected is located in the program's run time environment, identified by identifier and element attributes.
Access arguments of a subroutine.
Check here
Project the result of expressions into the target relation.
A statement for returning from the subroutine.
This class represents an operation which has a nested operation.
A nested operation. A list of tuples that satisfied the condition will be filtered out. Then apply nestedOperation on those tuples.
This class represents a search action.
An aggregate operation, see the example here.
Lookup a particular element within a record in the environment.
This class represents a search action on a specific relation.
Perform nestedOperation on all tuples in the target relation.
Perform nestedOperation on all tuples in the target relation that match the pattern queryPattern.
This class represents an infinite loop, the body should be evaluated infinitely. A RamLoop instance should always have at least one RamExit object inside of body. See RamExit.
Represent a terminate condition.
This statement should always occur inside a RamLoop and will cause the loop to terminate if the RamCondition is true.
A merge operation, merge the tuples from the source relation into the target relation.
This class holds a list of RamStatement that should be executed in sequence.
This class represents the strata of the program.
This clas represents the start of a RAM query operation. Please check RamOperation.
A swap operation, swap the content of two relations.
Profiling and debugging purpose.
This class hold a list of RamStatement that should be executed in parallel.
Statements that take on a specific relation.
A create action. Represent a creation of a new relation.
A remove operation. Remove the target relation.
A clear operation. Clean the content in a target relation.
Represents a fact in a relation.
This class hold a list of IOs, this class represents a write action. Output the content of a RamRelationReference through the IOs.
This class hold a list of IOs, this class represents a read action. Read the content through IOs and store in the target RamRelationReference.
Debugging and profiling purpose.