MCPcopy Create free account
hub / github.com/BasisResearch/lean.py / StringRef

Class StringRef

lean_py/z3/core.py:2245–2266  ·  view source on GitHub ↗

String expression.

Source from the content-addressed store, hash-verified

2243
2244
2245class StringRef(ExprRef):
2246 """String expression."""
2247
2248 __slots__ = ()
2249
2250 def __init__(
2251 self,
2252 ast: ASTNode,
2253 vars: frozenset[tuple[str, ASTSort]] = frozenset(),
2254 ) -> None:
2255 super().__init__(ast, StringSort(), vars)
2256
2257 def __add__(self, other: StringRef) -> StringRef:
2258 if isinstance(other, str):
2259 other = StringVal(other)
2260 return StringRef(
2261 StrConcatNode(self._ast, other._ast),
2262 _merge(self._vars, other._vars),
2263 )
2264
2265 def __radd__(self, other: str) -> StringRef:
2266 return StringVal(other) + self
2267
2268
2269def StringSort() -> StringSortRef:

Callers 10

ConstFunction · 0.85
__add__Method · 0.85
StringFunction · 0.85
StringValFunction · 0.85
ReplaceFunction · 0.85
SubStringFunction · 0.85
IntToStrFunction · 0.85
_make_typed_exprFunction · 0.85
_child_exprFunction · 0.85
StrFromCodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected