Class RewriteAlgebraicSimplificationStatic


  • public class RewriteAlgebraicSimplificationStatic
    extends HopRewriteRule
    Rule: Algebraic Simplifications. Simplifies binary expressions in terms of two major purposes: (1) rewrite binary operations to unary operations when possible (in CP this reduces the memory estimate, in MR this allows map-only operations and hence prevents unnecessary shuffle and sort) and (2) remove binary operations that are in itself are unnecessary (e.g., *1 and /1).
    • Constructor Detail

      • RewriteAlgebraicSimplificationStatic

        public RewriteAlgebraicSimplificationStatic()
    • Method Detail

      • rewriteHopDAG

        public Hop rewriteHopDAG​(Hop root,
                                 ProgramRewriteStatus state)
        Description copied from class: HopRewriteRule
        Handle a predicate hop DAG with exactly one root.
        Specified by:
        rewriteHopDAG in class HopRewriteRule
        Parameters:
        root - high-level operator root
        state - program rewrite status
        Returns:
        high-level operator
      • simplifyConstantConjunction

        public static Hop simplifyConstantConjunction​(Hop parent,
                                                      Hop hi,
                                                      int pos)