HopDagValidator 
This class allows to check hop dags for validity, e.g., parentchild linking.

HopRewriteRule 
Base class for all hop rewrites in order to enable generic
application of all rules.

HopRewriteUtils 

MarkForLineageReuse 

ProgramRewriter 
This program rewriter applies a variety of rulebased rewrites
on all hop dags of the given program in one pass over the entire
program.

ProgramRewriteStatus 

RewriteAlgebraicSimplificationDynamic 
Rule: Algebraic Simplifications.

RewriteAlgebraicSimplificationStatic 
Rule: Algebraic Simplifications.

RewriteBlockSizeAndReblock 
Rule: BlockSizeAndReblock.

RewriteCommonSubexpressionElimination 
Rule: CommonSubexpressionElimination.

RewriteCompressedReblock 
Rule: Compressed Re block if config compressed.linalg is enabled, we inject compression directions after read of
matrices if number of rows is above 1000 and cols at least 1.

RewriteConstantFolding 
Rule: Constant Folding.

RewriteElementwiseMultChainOptimization 
Prerequisite: RewriteCommonSubexpressionElimination must run before this rule.

RewriteForLoopVectorization 
Rule: Simplify program structure by pulling if or else statement body out
(removing the if statement block ifself) in order to allow intraprocedure
analysis to propagate exact statistics.

RewriteGPUSpecificOps 

RewriteHoistLoopInvariantOperations 
Rule: Simplify program structure by hoisting loopinvariant operations
out of while, for, or parfor loops.

RewriteIndexingVectorization 
Rule: Indexing vectorization.

RewriteInjectSparkLoopCheckpointing 
Rule: Insert checkpointing operations for caching purposes.

RewriteInjectSparkPReadCheckpointing 
Rule: BlockSizeAndReblock.

RewriteMarkLoopVariablesUpdateInPlace 
Rule: Mark loop variables that are only read/updated through cp left indexing
for update inplace.

RewriteMatrixMultChainOptimization 
Rule: Determine the optimal order of execution for a chain of
matrix multiplications
Solution: Classic Dynamic Programming
Approach: Currently, the approach based only on matrix dimensions
Goal: To reduce the number of computations in the runtime
(mapreduce) layer

RewriteMatrixMultChainOptimizationSparse 
Rule: Determine the optimal order of execution for a chain of
matrix multiplications
Solution: Classic Dynamic Programming
Approach: Currently, the approach based only on matrix dimensions
and sparsity estimates using the MNC sketch
Goal: To reduce the number of computations in the runtime
(mapreduce) layer

RewriteMergeBlockSequence 
Rule: Simplify program structure by merging sequences of lastlevel
statement blocks in order to create optimization opportunities.

RewriteRemoveDanglingParentReferences 
This rewrite is a generalpurpose cleanup pass that removes any
dangling parent references in one pass through the hop DAG.

RewriteRemoveEmptyBasicBlocks 
Rule: Simplify program structure by removing empty lastlevel blocks,
which may originate from the original program or due to a sequence of
rewrites (e.g., checkpoint injection and subsequent IPA).

RewriteRemoveForLoopEmptySequence 
Rule: Simplify program structure by removing (par)for statements iterating over
an empty sequence, i.e., (par)forloops without a single iteration.

RewriteRemovePersistentReadWrite 
This rewrite is a custom rewrite for JMLC in order to replace all persistent reads
and writes with transient reads and writes from the symbol table.

RewriteRemoveReadAfterWrite 
Rule: RemoveReadAfterWrite.

RewriteRemoveUnnecessaryBranches 
Rule: Simplify program structure by pulling if or else statement body out
(removing the if statement block ifself) in order to allow intraprocedure
analysis to propagate exact statistics.

RewriteRemoveUnnecessaryCasts 
Rule: RemoveUnnecessaryCasts.

RewriteSplitDagDataDependentOperators 
Rule: Split Hop DAG after specific datadependent operators.

RewriteSplitDagUnknownCSVRead 
Rule: Split Hop DAG after CSV reads with unknown size.

RewriteTransientWriteParentHandling 
Rule: Eliminate for Transient Write DataHops to have no parents
Solution: Move parent edges of Transient Write Hop to parent of
its child
Reason: Transient Write not being a root messes up
analysis for Lop's to Instruction translation (according to Amol)

StatementBlockRewriteRule 
Base class for all hop rewrites in order to enable generic
application of all rules.
