Documentation

Blaster.Optimize.Rewriting.OptimizeString

Return true when e corresponds to the null string literal.

Equations
Instances For

    Normalize String.mk (List.cons c₁ (.. (List.cons cₙ List.nil))) to Expr.lit (Literal.strVal s) only when the list of chars are constant values. Otherwise return (mkApp f args[0]!). Assume that `f := Expr.const ``String.mk. An error is triggered when args.size ≠ 1.

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

        Apply the following simplification/normalization rules on String.append :

        • S1 ++ S2 ==> S1 "++" S2
        • "" ++ e | e ++ "" ==> e Assume that f = Expr.const ``String.append. An error is triggered when args.size ≠ 2 (i.e., only fully applied String.append expected at this stage)
        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          Given op1 and op2 corresponding to the operands for String.append return some (S1 "++" S2) when op1 := S1 ∧ op2 := S2. Otherwise none.

          Equations
          Instances For

            Given op1 and op2 corresponding to the operands for String.append,

            • return some op2 when op1 := ""`.
            • return some op1 when op2 := ""Otherwisenone`.
            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              Apply the following simplification/normalization rules on String.length :

              • String.length S ==> "String.length" S Assume that f = Expr.const ``String.length. An error is triggered when args.size ≠ 1 (i.e., only fully applied String.length expected at this stage)
              Equations
              • One or more equations did not get rendered due to their size.
              Instances For

                Apply the following simplification/normalization rules on String.replace :

                • String.replace e1 e2 e3 ==> e1 (if e2 =ₚₜᵣ e3)
                • String.replace S1 S2 S3 ==> "String.replace" S1 S2 S3
                • String.replace "" e2 e3 ==> "" Assume that f = Expr.const ``String.replace. An error is triggered when args.size ≠ 3 (i.e., only fully applied String.replace expected at this stage)
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For

                  Given op1, op2 and op3 corresponding to the operands for String.replace return some ("String.replace" S1 S2 S3) when op1 := S1 ∧ op2 := S2 ∧ op3 := S3. Otherwise none.

                  Equations
                  Instances For

                    Apply simplification/normalization rules on String operators.

                    Equations
                    Instances For