Documentation

Blaster.Optimize.Basic

@[inline]

Given e := Expr.fVar fv perform the following:

  • When some v := fv.getValue? return Sum.inl (.InitOptimizeExpr v :: stack)`
  • Otherwise: return stackContinuity stack (← mkExpr e)`
Equations
  • One or more equations did not get rendered due to their size.
Instances For
    @[inline]

    Given a function f := Expr const n l perform the following:

    • When n := mInfo ∈ isMatcherCache (i.e., match info already optimized)
      • return none
    • When let some mInfo ← getMatcherRecInfo? n l (i.e., f's generic instance not optimized)
      • return some $ Sum.inr (mInfo, matchFun)
    • Otherwise none
    Equations
    Instances For
      @[inline]
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        @[inline]

        Same as optimizeExpr but updates local context before optimizing expression

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          Populate the recFunInstCache with opaque recursive function definition. This function need to be call before performing optimization on a lean expression. NOTE: This function need to be updated each time we are opacifying a new recursive function.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            Perform the following actions:

            • populate the recFunInstCache with default recursive function definitions.
            • optimize expression e
            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              Optimize an expression using the given solver options.

              Parameters #

              • sOpts: The solver options to use for optimization.
              • expr: The expression to be optimized.

              Returns #

              • A tuple containing the optimized expression and the optimization environment. NOTE: This function is to be used only by callOptimize in package Test.
              Equations
              • One or more equations did not get rendered due to their size.
              Instances For