Documentation

Blaster.Optimize.Expr

@[implemented_by _private.Blaster.Optimize.Expr.0.Blaster.Optimize.exprEqUnsafe]

Safe implementation of physically equivalence for Expr.

Equations
Instances For
    @[inline]

    Return true if e contains free / bounded variables.

    Equations
    Instances For
      Instances For
        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          @[implemented_by Blaster.Optimize.containsFVarImp]
          Equations
          Instances For
            @[inline]

            Return true if v occurs at least once in e.

            Equations
            Instances For

              If the e is a sequence of lambda fun x₁ => fun x₂ => ... fun xₙ => b, return b. Otherwise return e.

              Equations
              Instances For
                @[inline]

                Determine if e is a boolean not expression and return its corresponding argument. Otherwise return none.

                Equations
                Instances For
                  @[inline]

                  Determine if e is a boolean and expression and return its corresponding argument. Otherwise return none.

                  Equations
                  Instances For
                    @[inline]

                    Determine if e is a boolean or expression and return its corresponding argument. Otherwise return none.

                    Equations
                    Instances For
                      @[inline]

                      Determine if e is a Bool literal expression b and return some b. Otherwise none

                      Equations
                      Instances For

                        Return true only when e is a Bool literal. Otherwise false`

                        Equations
                        Instances For
                          @[inline]

                          Determine if e is an boolean == expression and return its corresponding arguments. Otherwise return none.

                          Equations
                          Instances For
                            @[inline]

                            Determine if e is an Eq expression and return its corresponding arguments. Otherwise return none.

                            Equations
                            Instances For
                              @[inline]

                              Determine if e is an LE.le expression and return its corresponding arguments. Otherwise return none.

                              Equations
                              Instances For
                                @[inline]

                                Determine if e is an LT.lt expression and return its corresponding arguments. Otherwise return none.

                                Equations
                                Instances For
                                  @[inline]

                                  Determine if e is an Not expression and return its corresponding argument. Otherwise return none.

                                  Equations
                                  Instances For
                                    @[inline]

                                    Determine if e is an And expression and return its corresponding arguments. Otherwise return none.

                                    Equations
                                    Instances For
                                      @[inline]

                                      Determine if e is an Or expression and return its corresponding arguments. Otherwise return none.

                                      Equations
                                      Instances For

                                        Return true when e1 := ¬ ne ∧ ne =ₚₜᵣ e2. Otherwise false.

                                        Equations
                                        Instances For

                                          Return true when e1 := not ne ∧ ne =ₚₜᵣ e2. Otherwise false.

                                          Equations
                                          Instances For

                                            Return true when e1 := false = c ∧ e2 := true = c.

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

                                              Return true if the given expression is of the form const ``Bool.

                                              Equations
                                              Instances For

                                                Return true if the given expression is of the form const ``Nat.

                                                Equations
                                                Instances For

                                                  Return true if the given expression is of the form const ``Int.

                                                  Equations
                                                  Instances For

                                                    Return true if the given expression is of the form const ``String.

                                                    Equations
                                                    Instances For
                                                      @[inline]

                                                      Determine if e is an autoParam expression and return its corresponding arguments. Otherwise return none.

                                                      Equations
                                                      Instances For
                                                        @[inline]

                                                        Return true only when e is a Nat literal expression Expr.lit (Literal.natVal n)

                                                        Equations
                                                        Instances For
                                                          @[inline]

                                                          Determine if e is a Nat literal expression Expr.lit (Literal.natVal n) and return some n as result. Otherwise return none NOTE: This function is to be used only when it is guaranteed that Nat.zero has been normalized to Expr.lit (Literal.natVal 0).

                                                          Equations
                                                          Instances For

                                                            Determine if e is a String literal expression Expr.lit (Literal.strVal s) and return some s as result. Otherwise return none.

                                                            Equations
                                                            Instances For

                                                              Determine if e is a UInt32 literal expression UInt32.mk (Fin.mk UInt32.size n isLt) and return some n only when n < UInt32.size. Otherwise return none

                                                              Equations
                                                              Instances For
                                                                @[inline]

                                                                Determine if e is a Char literal expression Char.mk (UInt32.mk (Fin.mk UInt32.size n isLt) and return some Char.ofNat n) only when Nat.isValidChar n. Otherwise return none

                                                                Equations
                                                                Instances For

                                                                  Return true if e := Nat.add e1 e2. Otherwise return false. Note that true is returned only when e is a fully applied `Nat.add expression.

                                                                  Equations
                                                                  Instances For

                                                                    Return true if e := Nat.sub e1 e2. Otherwise return false. Note that true is returned only when e is a fully applied `Nat.sub expression.

                                                                    Equations
                                                                    Instances For

                                                                      Return true if e := Nat.pow e1 e2. Otherwise return false. Note that true is returned only when e is a fully applied `Nat.pow expression.

                                                                      Equations
                                                                      Instances For
                                                                        @[inline]

                                                                        Determine if e is a Nat.mul expression and return its corresponding arguments. Otherwise return none.

                                                                        Equations
                                                                        Instances For
                                                                          @[inline]

                                                                          Determine if e is a Nat.add expression and return its corresponding arguments. Otherwise return none.

                                                                          Equations
                                                                          Instances For
                                                                            @[inline]

                                                                            Determine if e is a Nat.sub expression and return its corresponding arguments. Otherwise return none.

                                                                            Equations
                                                                            Instances For
                                                                              @[inline]

                                                                              Determine if e is a Nat.pow expression and return its corresponding arguments. Otherwise return none.

                                                                              Equations
                                                                              Instances For
                                                                                @[inline]

                                                                                Return some (f, op1, op2) when e is a binary operator. Otherwise none.

                                                                                Equations
                                                                                Instances For
                                                                                  @[inline]

                                                                                  Determine if e is an Int.neg expression and return its corresponding argument. Otherwise return none.

                                                                                  Equations
                                                                                  Instances For
                                                                                    @[inline]

                                                                                    Determine if e is a Int.add expression and return its corresponding arguments. Otherwise return none.

                                                                                    Equations
                                                                                    Instances For
                                                                                      @[inline]

                                                                                      Determine if e is a Int.mul expression and return its corresponding arguments. Otherwise return none.

                                                                                      Equations
                                                                                      Instances For
                                                                                        @[inline]

                                                                                        Determine if e is a Int.tdiv expression and return its corresponding arguments. Otherwise return none.

                                                                                        Equations
                                                                                        Instances For
                                                                                          @[inline]

                                                                                          Return true when e1 := -ne ∧ ne =ₚₜᵣ e2. Otherwise false.

                                                                                          Equations
                                                                                          Instances For
                                                                                            @[inline]

                                                                                            Determine if e is a Blaster.decide' expression and return its corresponding arguments. Otherwise return none.

                                                                                            Equations
                                                                                            Instances For
                                                                                              @[inline]

                                                                                              Determine if e is an Blaster.ite' expression and return its corresponding arguments. Otherwise return none.

                                                                                              Equations
                                                                                              Instances For
                                                                                                @[inline]

                                                                                                Determine if e is an Blaster.dite' expression and return its corresponding arguments. Otherwise return none.

                                                                                                Equations
                                                                                                Instances For
                                                                                                  @[inline]

                                                                                                  Return true only when e := Expr.const ``Blaster.dite' _ Otherwise false.

                                                                                                  Equations
                                                                                                  Instances For
                                                                                                    @[inline]

                                                                                                    Return true only when e is a Int expression corresponding to one of the following:

                                                                                                    Equations
                                                                                                    Instances For
                                                                                                      @[inline]

                                                                                                      Determine if e is a Int expression corresponding to one of the following:

                                                                                                      • Int.ofNat (Expr.lit (Literal.natVal n))
                                                                                                      • Int.negSucc (Expr.lit (Literal.natVal n)) Return either some (Int.ofNat n) or some (Int.negSucc n) as result. Otherwise return none NOTE: This function is to be used only when it is guaranteed that Nat.zero has been normalized to Expr.lit (Literal.natVal 0).
                                                                                                      Equations
                                                                                                      Instances For

                                                                                                        Given e of the form ∀ (a₁ : A₁) ... (aₙ : Aₙ), B[a₁, ..., aₙ] and p₁ : A₁, ... pₘ : Aₙ, return B[p₁, ..., pₘ].

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

                                                                                                              Return true only when e is a FVar of type ∀ α₀ → ... → αₙ.

                                                                                                              Equations
                                                                                                              Instances For