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

Function Store

lean_py/z3/core.py:1188–1198  ·  view source on GitHub ↗

Write to array.

(a: ArrayRef, idx: ExprRef, val: ExprRef)

Source from the content-addressed store, hash-verified

1186
1187
1188def Store(a: ArrayRef, idx: ExprRef, val: ExprRef) -> ArrayRef:
1189 """Write to array."""
1190 sort = a._sort
1191 if not isinstance(sort, ArraySortRef):
1192 raise TypeError(f"Store requires ArrayRef, got {type(a)}")
1193 merged: frozenset[tuple[str, ASTSort]] = frozenset().union(a._vars, idx._vars, val._vars)
1194 return ArrayRef(
1195 StoreNode(a._ast, idx._ast, val._ast),
1196 sort,
1197 merged,
1198 )
1199
1200
1201def K(domain: SortRef, val: ExprRef) -> ArrayRef:

Callers 15

_applyMethod · 0.90
test_select_storeMethod · 0.90
test_store_childrenMethod · 0.90
test_is_storeMethod · 0.90
test_storeMethod · 0.90

Calls 2

StoreNodeClass · 0.90
ArrayRefClass · 0.85