Record Class CompilerOptions

java.lang.Object
java.lang.Record
org.impulsegraph.compiler.trace.CompilerOptions

public record CompilerOptions(boolean enableTracing, boolean enableStage1Optimization, boolean enableStage2Optimization, boolean enableConstantFolding, boolean enableDirectionSelection, boolean enableFilterPushdown, boolean enableExperimental2HopFusion, int disabledPassesMask, PassTraceListener traceListener, Map<String,Object> parameters) extends Record
Configuration options, 14-pass optimization bitmask (SQLite SQLITE_TESTCTRL_OPTIMIZATIONS pattern), and parameter bindings for the ImpScheme compiler pipeline.
  • Field Details

  • Constructor Details

    • CompilerOptions

      public CompilerOptions(boolean enableTracing, boolean enableStage1Optimization, boolean enableStage2Optimization, boolean enableConstantFolding, boolean enableDirectionSelection, boolean enableFilterPushdown, boolean enableExperimental2HopFusion, PassTraceListener traceListener, Map<String,Object> parameters)
    • CompilerOptions

      public CompilerOptions(boolean enableTracing, boolean enableStage1Optimization, boolean enableStage2Optimization, boolean enableConstantFolding, boolean enableDirectionSelection, boolean enableFilterPushdown, PassTraceListener traceListener)
    • CompilerOptions

      public CompilerOptions(boolean enableTracing, boolean enableStage1Optimization, boolean enableStage2Optimization, boolean enableConstantFolding, boolean enableDirectionSelection, boolean enableFilterPushdown, boolean enableExperimental2HopFusion, int disabledPassesMask, PassTraceListener traceListener, Map<String,Object> parameters)
      Creates an instance of a CompilerOptions record class.
      Parameters:
      enableTracing - the value for the enableTracing record component
      enableStage1Optimization - the value for the enableStage1Optimization record component
      enableStage2Optimization - the value for the enableStage2Optimization record component
      enableConstantFolding - the value for the enableConstantFolding record component
      enableDirectionSelection - the value for the enableDirectionSelection record component
      enableFilterPushdown - the value for the enableFilterPushdown record component
      enableExperimental2HopFusion - the value for the enableExperimental2HopFusion record component
      disabledPassesMask - the value for the disabledPassesMask record component
      traceListener - the value for the traceListener record component
      parameters - the value for the parameters record component
  • Method Details

    • effectiveDisabledPassesMask

      public int effectiveDisabledPassesMask()
      Effective bitmask combining this instance's disabledPassesMask with the global ImpulseTestControl.getDisabledOptimizationsMask().
    • isOptimizationDisabled

      public boolean isOptimizationDisabled(int optFlag)
      SQLite OptimizationDisabled(db, mask) equivalent.
    • builder

      public static CompilerOptions.Builder builder()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • enableTracing

      public boolean enableTracing()
      Returns the value of the enableTracing record component.
      Returns:
      the value of the enableTracing record component
    • enableStage1Optimization

      public boolean enableStage1Optimization()
      Returns the value of the enableStage1Optimization record component.
      Returns:
      the value of the enableStage1Optimization record component
    • enableStage2Optimization

      public boolean enableStage2Optimization()
      Returns the value of the enableStage2Optimization record component.
      Returns:
      the value of the enableStage2Optimization record component
    • enableConstantFolding

      public boolean enableConstantFolding()
      Returns the value of the enableConstantFolding record component.
      Returns:
      the value of the enableConstantFolding record component
    • enableDirectionSelection

      public boolean enableDirectionSelection()
      Returns the value of the enableDirectionSelection record component.
      Returns:
      the value of the enableDirectionSelection record component
    • enableFilterPushdown

      public boolean enableFilterPushdown()
      Returns the value of the enableFilterPushdown record component.
      Returns:
      the value of the enableFilterPushdown record component
    • enableExperimental2HopFusion

      public boolean enableExperimental2HopFusion()
      Returns the value of the enableExperimental2HopFusion record component.
      Returns:
      the value of the enableExperimental2HopFusion record component
    • disabledPassesMask

      public int disabledPassesMask()
      Returns the value of the disabledPassesMask record component.
      Returns:
      the value of the disabledPassesMask record component
    • traceListener

      public PassTraceListener traceListener()
      Returns the value of the traceListener record component.
      Returns:
      the value of the traceListener record component
    • parameters

      public Map<String,Object> parameters()
      Returns the value of the parameters record component.
      Returns:
      the value of the parameters record component