Generated String constructors, sort-erased #
Whether s matches re.
Equations
- s.strInRegex re = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkTerm cvc5.Kind.STRING_IN_REGEXP #[s, re]
Instances For
Replaces every match of a regular expression.
Equations
- s.strReplaceReAll re repl = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkTerm cvc5.Kind.STRING_REPLACE_RE_ALL #[s, re, repl]
Instances For
Value of a string of digits, or -1 if it is not one.
Equations
- s.strToInt = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkTerm cvc5.Kind.STRING_TO_INT #[s]
Instances For
Reversal.
Equations
- s.strRev = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkTerm cvc5.Kind.STRING_REV #[s]
Instances For
Whether s contains sub.
Equations
- s.strContains sub = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkTerm cvc5.Kind.STRING_CONTAINS #[s, sub]
Instances For
The sub-string of length len starting at idx; empty when out of range.
Equations
- s.strSubstr idx len = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkTerm cvc5.Kind.STRING_SUBSTR #[s, idx, len]
Instances For
Replaces every occurrence of a sub-string.
Equations
- s.strReplaceAll pat repl = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkTerm cvc5.Kind.STRING_REPLACE_ALL #[s, pat, repl]
Instances For
Overwrites s from idx with repl, keeping its length; s if idx is out of range.
Equations
- s.strUpdate idx repl = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkTerm cvc5.Kind.STRING_UPDATE #[s, idx, repl]
Instances For
Whether suf is a suffix of s.
Equations
- suf.strSuffix s = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkTerm cvc5.Kind.STRING_SUFFIX #[suf, s]
Instances For
A string literal; with useEscapes, SMT-LIB escapes such as \u{48} in s are decoded.
Equations
- Cvc.Untyped.Term.mkString s useEscapes = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkString s useEscapes
Instances For
Whether pre is a prefix of s.
Equations
- pre.strPrefix s = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkTerm cvc5.Kind.STRING_PREFIX #[pre, s]
Instances For
Conversion to lower case.
Equations
- s.strToLower = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkTerm cvc5.Kind.STRING_TO_LOWER #[s]
Instances For
Replaces the first occurrence of a sub-string.
Equations
- s.strReplace pat repl = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkTerm cvc5.Kind.STRING_REPLACE #[s, pat, repl]
Instances For
Concatenation.
Equations
- lft.strConcat rgt = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkTerm cvc5.Kind.STRING_CONCAT #[lft, rgt]
Instances For
strConcat over two or more terms.
Equations
- Cvc.Untyped.Term.strConcatN terms atLeastTwoElements = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkTerm cvc5.Kind.STRING_CONCAT terms
Instances For
Whether the string is a single digit, "0" through "9".
Equations
- s.strIsDigit = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkTerm cvc5.Kind.STRING_IS_DIGIT #[s]
Instances For
Replaces the first match of a regular expression.
Equations
- s.strReplaceRe re repl = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkTerm cvc5.Kind.STRING_REPLACE_RE #[s, re, repl]
Instances For
Length.
Equations
- s.strLength = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkTerm cvc5.Kind.STRING_LENGTH #[s]
Instances For
Whether lft comes before rgt or equals it, lexicographically over code points.
Equations
- lft.strLe rgt = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkTerm cvc5.Kind.STRING_LEQ #[lft, rgt]
Instances For
The regular expression matching exactly the given string.
Equations
- s.strToRegex = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkTerm cvc5.Kind.STRING_TO_REGEXP #[s]
Instances For
Index of the first match of re in s at or after start, or -1.
Equations
- s.strIndexofRe re start = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkTerm cvc5.Kind.STRING_INDEXOF_RE #[s, re, start]
Instances For
Index of the first occurrence of sub in s at or after start, or -1.
Equations
- s.strIndexof sub start = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkTerm cvc5.Kind.STRING_INDEXOF #[s, sub, start]
Instances For
Decimal representation of a non-negative integer, or the empty string otherwise.
Equations
- arg.strFromInt = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkTerm cvc5.Kind.STRING_FROM_INT #[arg]
Instances For
The one-character string with the given code point, or the empty string if out of range.
Equations
- code.strFromCode = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkTerm cvc5.Kind.STRING_FROM_CODE #[code]
Instances For
Code point of a one-character string, or -1 otherwise.
Equations
- s.strToCode = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkTerm cvc5.Kind.STRING_TO_CODE #[s]
Instances For
Whether lft comes strictly before rgt, lexicographically over code points.
Equations
- lft.strLt rgt = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkTerm cvc5.Kind.STRING_LT #[lft, rgt]
Instances For
The one-character string at an index, or the empty string if out of bounds.
Equations
- s.strCharAt idx = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkTerm cvc5.Kind.STRING_CHARAT #[s, idx]
Instances For
Conversion to upper case.
Equations
- s.strToUpper = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkTerm cvc5.Kind.STRING_TO_UPPER #[s]
Instances For
Takes a term apart one level, if String owns its operator.
Equations
- One or more equations did not get rendered due to their size.
Instances For
String's operators, taken apart one level, sort-erased.
- strContains
[Ω]
(s sub : Term)
: View.String
Whether
scontainssub. - strPrefix
[Ω]
(pre s : Term)
: View.String
Whether
preis a prefix ofs. - strSuffix
[Ω]
(suf s : Term)
: View.String
Whether
sufis a suffix ofs. - strIsDigit
[Ω]
(s : Term)
: View.String
Whether the string is a single digit,
"0"through"9". - strLt
[Ω]
(lft rgt : Term)
: View.String
Whether
lftcomes strictly beforergt, lexicographically over code points. - strLe
[Ω]
(lft rgt : Term)
: View.String
Whether
lftcomes beforergtor equals it, lexicographically over code points. - strInRegex
[Ω]
(s re : Term)
: View.String
Whether
smatchesre. - strConcat
[Ω]
(kids : Kids)
: View.String
Concatenation.
kidsholds every operand, two or more. - strLength
[Ω]
(s : Term)
: View.String
Length.
- strSubstr
[Ω]
(s idx len : Term)
: View.String
The sub-string of length
lenstarting atidx; empty when out of range. - strCharAt
[Ω]
(s idx : Term)
: View.String
The one-character string at an index, or the empty string if out of bounds.
- strIndexof
[Ω]
(s sub start : Term)
: View.String
Index of the first occurrence of
subinsat or afterstart, or-1. - strIndexofRe
[Ω]
(s re start : Term)
: View.String
Index of the first match of
reinsat or afterstart, or-1. - strReplace
[Ω]
(s pat repl : Term)
: View.String
Replaces the first occurrence of a sub-string.
- strReplaceAll
[Ω]
(s pat repl : Term)
: View.String
Replaces every occurrence of a sub-string.
- strReplaceRe
[Ω]
(s re repl : Term)
: View.String
Replaces the first match of a regular expression.
- strReplaceReAll
[Ω]
(s re repl : Term)
: View.String
Replaces every match of a regular expression.
- strRev
[Ω]
(s : Term)
: View.String
Reversal.
- strUpdate
[Ω]
(s idx repl : Term)
: View.String
Overwrites
sfromidxwithrepl, keeping its length;sifidxis out of range. - strToLower
[Ω]
(s : Term)
: View.String
Conversion to lower case.
- strToUpper
[Ω]
(s : Term)
: View.String
Conversion to upper case.
- strToCode
[Ω]
(s : Term)
: View.String
Code point of a one-character string, or
-1otherwise. - strFromCode
[Ω]
(code : Term)
: View.String
The one-character string with the given code point, or the empty string if out of range.
- strToInt
[Ω]
(s : Term)
: View.String
Value of a string of digits, or
-1if it is not one. - strFromInt
[Ω]
(arg : Term)
: View.String
Decimal representation of a non-negative integer, or the empty string otherwise.
- strToRegex
[Ω]
(s : Term)
: View.String
The regular expression matching exactly the given string.
Instances For
Values #
Whether a term is a string value.
Equations
- term.isStringValue = (Cvc.Untyped.Term.toUnsafe✝ term).isStringValue
Instances For
The string a term denotes, failing if it denotes none.
Equations
- term.getStringValue? = Except.toOption term.getStringValue
Instances For
Equations
- One or more equations did not get rendered due to their size.
smt! literals #
String literals in smt!. Without this module smt! accepts none.
String literal.
Equations
- Cvc.Untyped.Term.smtStr = Lean.ParserDescr.node `Cvc.Untyped.Term.smtStr 1024 (Lean.ParserDescr.const `str)