Documentation

Cvc.Typed.Theory.String

Strings, typed #

The sub-string of length len starting at idx; empty when out of range.

Equations
Instances For

    Overwrites s from idx with repl, keeping its length; s if idx is out of range.

    Equations
    Instances For

      The one-character string at an index, or the empty string if out of bounds.

      Equations
      Instances For

        The regular expression matching exactly the given string.

        Equations
        Instances For

          Value of a string of digits, or -1 if it is not one.

          Equations
          Instances For

            Replaces every occurrence of a sub-string.

            Equations
            Instances For

              Code point of a one-character string, or -1 otherwise.

              Equations
              Instances For

                Whether s matches re.

                Equations
                Instances For

                  Whether the string is a single digit, "0" through "9".

                  Equations
                  Instances For

                    Whether suf is a suffix of s.

                    Equations
                    Instances For

                      Whether pre is a prefix of s.

                      Equations
                      Instances For

                        Index of the first match of re in s at or after start, or -1.

                        Equations
                        Instances For

                          Replaces the first match of a regular expression.

                          Equations
                          Instances For

                            Decimal representation of a non-negative integer, or the empty string otherwise.

                            Equations
                            Instances For

                              Whether lft comes before rgt or equals it, lexicographically over code points.

                              Equations
                              Instances For

                                Reversal.

                                Equations
                                Instances For

                                  Replaces every match of a regular expression.

                                  Equations
                                  Instances For

                                    Whether s contains sub.

                                    Equations
                                    Instances For

                                      Concatenation.

                                      Equations
                                      Instances For

                                        Conversion to upper case.

                                        Equations
                                        Instances For

                                          Conversion to lower case.

                                          Equations
                                          Instances For
                                            def Cvc.Typed.Term.mkString [Ω] (s : String) (useEscapes : Bool) :

                                            A string literal; with useEscapes, SMT-LIB escapes such as \u{48} in s are decoded.

                                            Equations
                                            Instances For

                                              The one-character string with the given code point, or the empty string if out of range.

                                              Equations
                                              Instances For

                                                Whether lft comes strictly before rgt, lexicographically over code points.

                                                Equations
                                                Instances For
                                                  def Cvc.Typed.Term.strConcatN [Ω] (terms : Terms String) (atLeastTwoElements : 2 ≤ Array.size terms := by (try grind) <;> fail "failed to prove term array has at least two elements") :

                                                  strConcat over two or more terms.

                                                  Equations
                                                  Instances For

                                                    Replaces the first occurrence of a sub-string.

                                                    Equations
                                                    Instances For
                                                      def Cvc.Typed.Term.strIndexof [Ω] (s sub : Term String) (start : Term Int) :

                                                      Index of the first occurrence of sub in s at or after start, or -1.

                                                      Equations
                                                      Instances For

                                                        Takes a term apart one level, at its sort, if String owns its operator and the term's sort fits it.

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

                                                          String's operators with a result of sort Regex.

                                                          • strToRegex [Ω] (s : Term String) : OnRegex

                                                            The regular expression matching exactly the given string.

                                                          Instances For

                                                            String's operators with a result of sort Bool.

                                                            Instances For

                                                              String's operators with a result of sort Int.

                                                              Instances For

                                                                String's operators with a result of sort String.

                                                                Instances For
                                                                  inductive Cvc.Typed.View.String [Ω] :
                                                                  Typ → Type

                                                                  String's operators, taken apart one level, indexed by the sort each produces.

                                                                  Instances For

                                                                    Values #

                                                                    Whether a term is a string value.

                                                                    Equations
                                                                    Instances For

                                                                      The string a term denotes, failing if it denotes none.

                                                                      Equations
                                                                      Instances For

                                                                        The string a term denotes, failing if it denotes none.

                                                                        Equations
                                                                        Instances For

                                                                          The string term denoting s, whatever characters it holds.

                                                                          Fails on a character beyond cvc5's alphabet, whose code points stop at 0x2FFFF.

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

                                                                            smt! literals of this theory #

                                                                            A string literal, written as in Lean, is a Term String.