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

Method pop

lean_py/z3/solver.py:571–575  ·  view source on GitHub ↗
(self, n: int = 1)

Source from the content-addressed store, hash-verified

569 self._stack.append(len(self._assertions))
570
571 def pop(self, n: int = 1) -> None:
572 for _ in range(n):
573 if not self._stack:
574 raise IndexError("pop from empty solver stack")
575 self._assertions = self._assertions[: self._stack.pop()]
576
577 def num_scopes(self) -> int:
578 """Return number of push scopes."""

Callers 8

__exit__Method · 0.95
test_solver_push_popMethod · 0.95
test_push_popMethod · 0.95
test_nested_push_popMethod · 0.95
push_popFunction · 0.95

Calls

no outgoing calls

Tested by 6

test_solver_push_popMethod · 0.76
test_push_popMethod · 0.76
test_nested_push_popMethod · 0.76